chartjs-plugin-streaming
chartjs-plugin-streaming copied to clipboard
Chart "click" event remains enabled when using the streaming plugin
I'm trying to disable all interaction events on a chart that uses chartjs-plugin-streaming
and chartjs-plugin-zoom
, but even though I have options.events: []
in my chart configuration, clicking on a point in my dataset still triggers the tooltip.
I've tested this by:
- replicating the "time" sample chart from the official documentation in JSFiddle, using
[email protected]
- adding
[email protected]
- setting
options.events
to an empty array, as per the official documentation.
note: the JSFiddle linked above doesn't show all the time series data correctly, all the points are on the left edge of the chart.. I didn't want to deviate too far from the original example code for this test, so I just simplified it a bit and added the most basic streaming plugin configuration with
pause: true
.
when I remove chartjs-plugin-streaming
from the mix, then I don't get any tooltips at all (which is what I need), but when I put it back in, I get tooltips when I click on a dataset point.
is this something I can override from the plugin configuration, or does this require code changes?
normally this wouldn't be a big issue, but this is inside a hybrid mobile app so I'm using ng2-charts
for the rendering, since I'm working with dynamic data sources I need some data to render the initial chart, which means I have a "hidden" dataset with no points and excluded from the chart legend.
tapping on a data point in the app UI results in errors in my console output originating deep within ChartJS itself.