use datetime values for x-axis in line-chart
Closed this issue · 3 comments
Hi, loving this package for graphs in flutter!
Just 1 thing though: if my x-axis values ('domain') are date-stamps I get an error that they must be type num. Could it be possible to use DateTime values there instead?
Yeah, we can replace the time-data with something like seconds-since-epoch - so it's now a numeric value and the graph works - but this makes the labels on the x-axis kinda meaningless (who knows how to translate that long number into the original datestamp that was in the data?). If the original data has timestamps which are meaningful and readable. I had a look at the source-code and can see where you've used num. It just means that line-charts are really not useful for time-based data, I guess. Thx anyway.