danvk / dygraphs

Interactive visualizations of time series using JavaScript and the HTML canvas tag
http://dygraphs.com
Other
3.17k stars 606 forks source link

light weight Date Axis as seperate component #687

Open mrin9 opened 8 years ago

mrin9 commented 8 years ago

We have multiple charts synchronized(by date) and stacked on top of each other, we do not want to repeat the Date Axis for each of these charts instead want to have the Date Axis on the top and bottom of the whole stack

currently we have created our own date slider for the job similar to https://github.com/IonDen/ion.rangeSlider but will be happy to get it from the graph library

danvk commented 8 years ago

Do you want to share the date axis for UI reasons or for performance reasons?

mrin9 commented 8 years ago

for the UI reason.

There is another use case where the stack charts will have there own date axis and at the bottom we will have just the DyGraphs Range Selector. but the problem is Dygraphs range selector dont draw axis

so we have gone with our own implementation of range slider.

one way would be to provide options that will allow user to specify not to draw the chart just the axis

danvk commented 8 years ago

You can set drawAxis to false for the x-axis to hide it on a particular chart.

It's also possible to draw just a range selector, see this demo

mrin9 commented 8 years ago

ok may be i can explan with an image

We are using just the range selector as a common range slider, we have made couple of modifications to it

Apart from that we wanted an Axis component (check the image below) which changes based on the dateWindow we attemted to create one but dont think ours is a good implementation.

IMO axis component should be from the graph library so they intigrate well with other graph component. Like range selector we can just draw just the axis, but we think thats a little hacky way, underneeth we are drawing a full blown chart

Image of stacked charts