@icij/murmur-next 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/murmur.js +1784 -1781
- package/dist/lib/murmur.js.map +1 -1
- package/dist/lib/murmur.umd.cjs +22 -22
- package/dist/lib/murmur.umd.cjs.map +1 -1
- package/lib/datavisualisations/ColumnChart.vue +24 -21
- package/package.json +1 -1
|
@@ -352,8 +352,9 @@ export default defineComponent({
|
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
function barTooltipStyle(bar: { x: number; y: number; width: number }) {
|
|
355
|
-
const
|
|
356
|
-
const
|
|
355
|
+
const { x, y } = el?.value?.getBoundingClientRect() ?? new DOMRect()
|
|
356
|
+
const top = `${y + bar.y + margin.value.top}px`
|
|
357
|
+
const left = `${x + bar.x + bar.width / 2 + margin.value.left}px`
|
|
357
358
|
return { top, left }
|
|
358
359
|
}
|
|
359
360
|
|
|
@@ -441,27 +442,29 @@ export default defineComponent({
|
|
|
441
442
|
</g>
|
|
442
443
|
</g>
|
|
443
444
|
</svg>
|
|
444
|
-
<
|
|
445
|
-
<div v-
|
|
446
|
-
<div
|
|
447
|
-
<
|
|
448
|
-
<
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
<
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
445
|
+
<teleport to="body">
|
|
446
|
+
<div v-if="!noTooltips" class="column-chart__tooltips">
|
|
447
|
+
<div v-for="(bar, index) in bars" :key="index">
|
|
448
|
+
<div :style="barTooltipStyle(bar)" class="column-chart__tooltips__item">
|
|
449
|
+
<transition name="fade">
|
|
450
|
+
<div
|
|
451
|
+
v-if="shownTooltip === index"
|
|
452
|
+
class="column-chart__tooltips__item__wrapper"
|
|
453
|
+
>
|
|
454
|
+
<slot name="tooltip" v-bind="bar">
|
|
455
|
+
<h6 class="column-chart__tooltips__item__wrapper__heading mb-0">
|
|
456
|
+
{{ formatXDatum(bar.datum[timeseriesKey]) }}
|
|
457
|
+
</h6>
|
|
458
|
+
<div class="column-chart__tooltips__item__wrapper__value">
|
|
459
|
+
{{ formatYDatum(bar.datum[seriesName]) }}
|
|
460
|
+
</div>
|
|
461
|
+
</slot>
|
|
462
|
+
</div>
|
|
463
|
+
</transition>
|
|
464
|
+
</div>
|
|
462
465
|
</div>
|
|
463
466
|
</div>
|
|
464
|
-
</
|
|
467
|
+
</teleport>
|
|
465
468
|
</div>
|
|
466
469
|
</template>
|
|
467
470
|
|