sgratzl / chartjs-chart-boxplot

Chart.js Box Plots and Violin Plot Charts
https://www.sgratzl.com/chartjs-chart-boxplot/
MIT License
101 stars 23 forks source link

Tooltips `custom` doesn't work #34

Closed roman-golubov closed 1 year ago

roman-golubov commented 1 year ago

I'm having the following question... After moving from @datavisyn/chartjs-chart-box-and-violin-plot Tooltips doesn't work. We are using custom function for tooltips render.

Correct result before update was this p7ks5zwim7tw8909wfyxl5w1vcaeo3

Screenshots / Sketches Screenshot 2022-07-18 at 14 44 09

sgratzl commented 1 year ago

can you provide an example containing the following:

roman-golubov commented 1 year ago

I'm using Vue js. The solution was to import chart js plugin via Tree shaking Chart.js 3 is tree-shakeable - reference

import { Chart, Tooltip, CategoryScale, LinearScale } from 'chart.js';
import { BoxPlotChart } from '@sgratzl/chartjs-chart-boxplot';
Chart.register(
  BoxPlotChart,
  Tooltip,
  CategoryScale,
  LinearScale
);