Skip to content

Commit f78387c

Browse files
committed
Custom tooltips post release fixes
1 parent a9f7024 commit f78387c

12 files changed

+12
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-data-ui",
33
"private": false,
4-
"version": "2.0.5",
4+
"version": "2.0.6",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/components/vue-ui-age-pyramid.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function useTooltip(index, datapoint) {
184184
185185
const customFormat = agePyramidConfig.value.style.tooltip.customFormat;
186186
187-
if (customFormat && typeof customFormat({
187+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
188188
seriesIndex: index,
189189
datapoint: {
190190
segment: datapoint[0],

src/components/vue-ui-candlestick.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function useTooltip(index, datapoint) {
188188
189189
const customFormat = candlestickConfig.value.style.tooltip.customFormat;
190190
191-
if (customFormat && typeof customFormat({
191+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
192192
seriesIndex: index,
193193
datapoint,
194194
series: drawableDataset.value,

src/components/vue-ui-heatmap.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function useTooltip(datapoint, seriesIndex) {
181181
182182
const customFormat = heatmapConfig.value.style.tooltip.customFormat;
183183
184-
if (customFormat && typeof customFormat({
184+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
185185
datapoint,
186186
seriesIndex,
187187
series: mutableDataset.value,

src/components/vue-ui-molecule.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ function createTooltipContent(node) {
250250
251251
const customFormat = moleculeConfig.value.style.chart.tooltip.customFormat;
252252
253-
if (customFormat && typeof customFormat({
253+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
254254
seriesIndex: -1,
255255
datapoint: node,
256256
series: convertedDataset.value,

src/components/vue-ui-quadrant.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ function useTooltip(category, plot, categoryIndex) {
426426
427427
const customFormat = quadrantConfig.value.style.chart.tooltip.customFormat;
428428
429-
if (customFormat && typeof customFormat({
429+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
430430
seriesIndex: categoryIndex,
431431
datapoint: plot,
432432
series: drawableDataset.value,

src/components/vue-ui-radar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function useTooltip(apex, i) {
299299
const customFormat = radarConfig.value.style.chart.tooltip.customFormat;
300300
console.log({customFormat})
301301
302-
if (customFormat && typeof customFormat({
302+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
303303
seriesIndex: i,
304304
datapoint: apex,
305305
series: { categories: datasetCopy.value, datapoints: seriesCopy.value, radar: radar.value },

src/components/vue-ui-rings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function useTooltip(index, datapoint) {
191191
const selected = convertedDataset.value[index];
192192
const customFormat = ringsConfig.value.style.chart.tooltip.customFormat;
193193
194-
if (customFormat && typeof customFormat({
194+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
195195
seriesIndex: index,
196196
datapoint,
197197
series: convertedDataset.value,

src/components/vue-ui-scatter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function useTooltip(plot, seriesIndex) {
210210
211211
const customFormat = scatterConfig.value.style.tooltip.customFormat;
212212
213-
if (customFormat && typeof customFormat({
213+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
214214
datapoint: plot,
215215
seriesIndex,
216216
series: drawableDataset.value,

src/components/vue-ui-vertical-bar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function useTooltip(bar, seriesIndex) {
260260
261261
const customFormat = verticalBarConfig.value.style.chart.tooltip.customFormat;
262262
263-
if (customFormat && typeof customFormat({
263+
if (customFormat && typeof customFormat === 'function' && typeof customFormat({
264264
datapoint: bar,
265265
series: immutableDataset.value,
266266
config: verticalBarConfig.value,

0 commit comments

Comments
 (0)