You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using KlineCharts and would like to add a “Pen Tool” for freehand drawing directly on the chart. The tool should allow users to draw arbitrary lines by simply moving the mouse while holding down the left mouse button.
I attempted to create a custom overlay using registerOverlay, but encountered difficulties implementing freehand drawing functionality. The issue is that when I click and move the mouse, the chart scrolls instead of drawing. I tried disabling scrolling and zooming features, but it didn’t resolve the problem.
I couldn’t achieve the expected result with this code. I’d greatly appreciate any recommendations or an example solution for implementing such a tool.
Here is my code for the tool:
I’m using KlineCharts and would like to add a “Pen Tool” for freehand drawing directly on the chart. The tool should allow users to draw arbitrary lines by simply moving the mouse while holding down the left mouse button.
I attempted to create a custom overlay using registerOverlay, but encountered difficulties implementing freehand drawing functionality. The issue is that when I click and move the mouse, the chart scrolls instead of drawing. I tried disabling scrolling and zooming features, but it didn’t resolve the problem.
I couldn’t achieve the expected result with this code. I’d greatly appreciate any recommendations or an example solution for implementing such a tool.
Here is my code for the tool:
The text was updated successfully, but these errors were encountered: