HanSolo / charts

A JavaFX library that contains different kind of charts
Apache License 2.0
670 stars 82 forks source link

LocalDate and LocalDateTime Axis types #6

Open thomasnield opened 6 years ago

thomasnield commented 6 years ago

Hey Gerrit,

There doesn't seem to be any good LocalDate and LocalDateTime axis types. Would this be something that's in scope for this library?

I'm coming across this need a lot as I play with your charts and JavaFX charts in general.

Thomas Nield

HanSolo commented 6 years ago

Added first support for time based data to Axis. The main idea is to have a new TYDataObject which extends the XYDataObject and has an additional field for LocalDateTime. The Axis now also supports this kind of DataObject and has a dynamic format. Meaning to say if you increase the window width for example the horizontal scale should adjust according to the available space and range. You can find a demo in the TimeAxisTest.java file. Not sure if this approach will be the final solution but at least it works kind of :) Feel free to play around with it and let me know what you think...

thomasnield commented 6 years ago

That makes perfect sense, I'll play with it.

By the way, Edvin created a tornadofx-charts repository, which will have the TornadoFX DSLS's around this library. I'll put the initial commit in later.

thomasnield commented 6 years ago

I haven't forgotten this. I will follow up and re engage

HanSolo commented 6 years ago

no worries 😉

thomasnield commented 6 years ago

I have a project I need this for now. Lemme see if I can streamline this a little with a nice wrapper....