Is it possible to create a brush chart with ChartJS?

315 Views Asked by At

Is it possible to create a brush chart as in this example using ChartJS and potentially plugins?

enter image description here

I’ve seen the zoom plugin https://www.chartjs.org/chartjs-plugin-zoom/latest/samples/drag/category.html which is almost like that but not quite.

1

There are 1 best solutions below

1
On

Isn't exactly what you want to do, but i've use crosshair plugin to select an area on a chart and then do a zoom in other charts. With this option is posible to select an area, but it can't be edit.

You need to overwrite beforeZoom callback method, so you get the range of you brush of the main chart, then return false to prevent zoom in the main chart. With the range, you'll be able to apply manualy a filter in the other charts.

Hope this help you c: