Chart.js: Add support for zoom / scroll / pan options?

Created on 13 Jul 2015  路  24Comments  路  Source: chartjs/Chart.js

My feature request is something similar to this demo on amcharts:
http://www.amcharts.com/demos/line-chart-with-scroll-and-zoom/

Most specifically: the top bar that allows you to zoom / scroll into a specific date for your data. This is really useful when you have lot's of data to show. This could be a multi-release feature first only support that kind of bar and supporting the select/zoom on the chart itself.

This is also named as "timeline" feature on this wikipedia page: https://en.wikipedia.org/wiki/Comparison_of_JavaScript_charting_frameworks so supporting it would allow chartjs to have another YES on that table :)

enhancement

Most helpful comment

I agree with @pjfsilva that #726 is a poor implementation of zooming. Something similar to amcharts is needed: http://www.amcharts.com/demos/line-chart-with-scroll-and-zoom/

All 24 comments

+1

+1 sir

This is imperative! Any dataset much over 50 elements becomes unreadable. We need the ability to scroll off the screen.

That's exactly what I need!
I am unable to follow this tip: https://github.com/nnnick/Chart.js/issues/726#issuecomment-81430428

+1

+1

We've thrown around some ideas for this functionality. But it most likely won't come until well after 2.0 is released. PR's to the v2.0-dev branch are welcome!

+1

+1

+1

Consolidating with #726 which will be used to track all zoom/pan requests

+1

+1

+1

+1

Why are you all adding your "+1" here? The feature is implemented: https://github.com/chartjs/Chart.Zoom.js

well, Chart.Zoom.js is not working, as it assumes es6 and require.

Even when tweaked into not erroring, it doesn't pan nor zoom horizontally. No control, doc, test.

I don't call that _implemented_ ;)

@roselan Chart.Zoom.js provides a built version here: https://github.com/chartjs/Chart.Zoom.js/blob/master/Chart.Zoom.js

I'm happy to merge PRs to it adding docs, tests, etc.

Indeed, I didn't see the dist version in main root. However, x pan/zoom not work (it's already an issue in the chrart.js repo).

Because I need this feature I ended switching to amCharts. It has a free license with a small link leading to their website.

@etimberg Please note my initial request is not filled out on #726 that is also closed.

My initial request is mainly direct at that 'top bar' I mention on the example, also called as timeline in the wikipedia page. Chart.Zoom plugin goal is different from mine as it seems it only supports zoom but clearly lacks this 'timeline' feature which I think is a great UI to achieve scroll/pan in large charts along a timeline, as the amcharts demo shows.

I would advise into reopening this to track this specific feature request but it's up to the projects owners to decide that. I just wanted to clarify that #726 clearly does not fill my initial idea.

+1

+1

I agree with @pjfsilva that #726 is a poor implementation of zooming. Something similar to amcharts is needed: http://www.amcharts.com/demos/line-chart-with-scroll-and-zoom/

Was this page helpful?
0 / 5 - 0 ratings