Is there a Line chart zoom in function?

Share RGraph:  

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Othmar on 22nd May 2017
Hi Richard

I want to renew my Flash graph on this page www.awekas.at/en/archiv.php?id=2
Is it possible to generate such zommable line graph with Rgraph? Have you a idea?

Regards Othmar

PS: Instrument panel with free designable RGraph gauges (color, size, position.... editable by each user) are online and ready: www.awekas.at/en/instrument.php?id=2
RGraph is the BEST HTML library!!! Thanks a lot.
Posted by Richard on 22nd May 2017
Hi there,

There isn't a zoom function like that that's a feature of RGraph. The zoom in RGraph is a whole canvas zoom function:

www.rgraph.net/canvas/docs/adding-zoom-to-your-charts.html

It is possible I think though, with the Scatter chart, but will require a fair amount of custom programming.

I've been thinking about this for some time now - so I'll make a demo to show you.

It basically could be done by using the click event so you click the chart, which gives you an X coordinate, then click the chart again which gives you another X coordinate and then set the xmin and xmax configuration options to those values and redraw. Something like that anyway. It wouldn't be that tricky to change that into a click/drag/highlight which would give you the area to zoom in on.

> RGraph is the BEST HTML library!!! Thanks a lot.

I so wish that more people thought that - but as my Google rank is now 20th - I guess they don't!


Richard
Posted by Richard on 24th May 2017
Hi there,

OK I've created a Scatter chart example that allows you to zoom in on the data:

www.rgraph.net/tests/scatter-drill-down.html

It has no X labels as yet. It's also not an inconsiderable mount of code - but I don't think that it's particularly hard to understand.


Richard
Posted by Richard on 24th May 2017
Hi there,

And now there's labels too. I'll eventually put this in the demos - so if you want it then look for it there (it's a Scatter chart demo remember).


Richard

Add a reply




« Back to message list