chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
63.94k stars 11.89k forks source link

Inquiry about Interactivity Features for Line Charts in Chart.js #11634

Closed koshak01 closed 6 months ago

koshak01 commented 6 months ago

Feature Proposal

I hope this message finds you well. I am currently working with the Chart.js library for creating Line charts, and I've been exploring ways to implement interactive features such as dynamic movement, zooming in, and zooming out on the Line chart using JavaScript.

I have thoroughly reviewed the documentation, but I couldn't find specific information on how to achieve this functionality. Could you please provide guidance or point me in the right direction on how to dynamically move, zoom in, and zoom out on a Line chart using Chart.js?

Your assistance in this matter is highly appreciated, and I look forward to your valuable insights.

Thank you for your time and support.

Possible Implementation

No response

LeeLenaleee commented 6 months ago

For these kind of questions please head over to Stack overflow.

Chart.js has no baked in support for zooming, panning and dynamic movement. Their are plugins you can use that add this behaviour.

https://www.chartjs.org/chartjs-plugin-zoom/latest/ https://nagix.github.io/chartjs-plugin-streaming/latest/

Their is a repo with a bunch of community plugins that you can search through for more extensions: https://github.com/chartjs/awesome

koshak01 commented 5 months ago

Super - worked

window.my_chart.pan((10, 100)) window.my_chart.zoom(1.6) )