terezka / elm-charts

Create SVG charts in Elm.
https://www.elm-charts.org
BSD 3-Clause "New" or "Revised" License
711 stars 67 forks source link

Need help with DateTime Axis? #60

Closed anagrius closed 6 years ago

anagrius commented 7 years ago

In our application we need a lot of timecharts. I was wondering if there are any plans on supporting them out of the box, or if you are interested in getting pull requests for tick positions and label formatting specifically for DateTime Axis?

terezka commented 7 years ago

It seems to be a common use, so that's a great idea! I'll add some helpers in the new version!

anagrius commented 7 years ago

Awesome. We have made our own and would love support out of the box. The biggest challenge was getting labels right. Meaning using meaningful dates (e.g. 1 days, 2 weeks, 3 months, 6 months) for arbitrary intervals. We ended up porting the logic from Highcharts:

https://github.com/highcharts/highcharts/blob/a270307bbc099909760b801bf877abb6a77f5581/js/parts/DateTimeAxis.js

Where they had done the ground work for us.

stuartnelson3 commented 7 years ago

Definitely need this, as all the data I plot is for timeseries.

anagrius commented 6 years ago

Anyone done any work on this else I will start soon

terezka commented 6 years ago

Hi! I'm splitting the library into smaller chart libraries, so the work is being done here: https://github.com/terezka/lines

I haven't worked on data series specifically, so you can go ahead if you'd like :)

anagrius commented 6 years ago

That sounds like a great idea, as long as area and lines would have compatible options and data, since we switch between them based on user preference.

Or would you include area as part of lines?

UPDATE: Just looked through the code. They are. Closing this.

@terezka You should really let people know about this plan, maybe close issues and make a paragraph about it in the README?

terezka commented 6 years ago

@anagrius You're right, I'll do that!

terezka commented 6 years ago

Done! Thanks for the reminder.