@vishwas it does not work when the height gets updated
https://codesandbox.io/p/sandbox/chart-js-react-forked-9lnjtz
Hi @vishwas ,
I wanted to ask about the JSFiddle you shared: https://jsfiddle.net/otq63gp8/. Is it possible to replicate the behavior of the stripline’s thickness, so that it dynamically adjusts based on the user’s zoom level or depending on the distance between the minimum and maximum values?
Thank you!
Apologies it was a paste mistake, please look at the updated link https://stackblitz.com/edit/canvasjs-chart-tooltip-to-stripline-qdratg?file=src%2FApp.jsx
Regarding the range-area approach, one of the issues is that I can’t use value instead of startValue and endValue like the striplines
Perhaps if you added an EventCallbackFunction option for the striplines it will be easier to do
even on window resize the tooltip won’t be placed correctly
thanks, I modified the code to add the tooltipContent from the options but for some reason it’s not working on zoom/panning.
Can you please have a look? https://stackblitz.com/edit/canvasjs-chart-tooltip-to-stripline-qdratg?file=src%2FApp.jsx
One of the issues is that on zoom the tooltips are not moving and are triggered on the old position of the striplines
it might be in the viewport but moved if you zoomed in on it, it wont work
thank you but there are still not the same width, look at the 20 in the first graph vs the 2nd one. it should look the same since it the same properties for both graphs. Is it possible to force a certain width?
https://stackblitz.com/edit/canvasjs-chart-tooltip-to-stripline-nhtufj?file=src%2FApp.jsx
the tooltip will still be there when I zoom on another area
it’s not working in this case https://jsfiddle.net/4gq3tjv8/
Any ETA on the bug fix?
https://stackblitz.com/edit/canvasjs-chart-tooltip-to-stripline-dt1nzk?file=src%2FApp.jsx
how to clear them ? if you hover on no data it will still be there
the issue with this approach is that it overrides other striplines in some cases
Do you have the first example you sent using React ?
using CanvasJSChart
Thank you, is it also possible to add the stripline to the legend? (like dataseries 1 in this example https://jsfiddle.net/api/post/library/pure/) ?