Time intervals
I have a doubt, how can i use time intervals with chartist? I have some series that runs across months, days, hours and years.
Can you elaborate a bit more? Maybe provide an example on what you'd like to do?
Let's say that i have the following data in pseudo-code
var values = [1, 2, 3, 5]
var dates = ["Jan 1 2014", "Jan 2 2014", "Jan 3 2014", "Jan 5 2014"]
What i want is that in the bar chart prints also the missing day (Jan 4 2014). This situation is also for intervals of hours, minutes, years, months
Any tip on this case? Thanks in advance,
Hey there. Timeframes are not supported currently but Ive also thought about this as its quite a common use case. Lets leave the issue open and track any further demand
In the meanwhile you could always have your own transformation function that generates the data object for chartist.
+1 for this feature!
+1 this would be great to have
+1 for this!
In a similar vein, I'm trying to use time as my y axis data. Right now it seems to automatically convert it to total milliseconds, is there any way to convert it to a formatted string? I.e. "2:57" or "15:24"? Thanks!
Hi,
I'm working on DateAxis/LineXY feature (https://github.com/baks/chartist-js) I asked Gion Kunz about this features to make a pull request.
Simple example here: http://jsbin.com/yevewanuya/3/edit?js,output
Hi @baks ! Wow you were really fast with this :-) I'll do a new push this weekend where the Axes code is further stabilizing. Maybe you need to update your code based on that.
How's this going? Would love this feature.
@blysik I'm working on a code restructuring right now. We should simplify the code once more and then introduce more flexibility to the existing line chart so that the axis can be configured freely. Let's see whats the progress but I hope to have something soon.
:+1:
+1
Hi guys. The groundwork for this is here in 0.9.0 but I didn't have time to implement the new dynamic axes for the bar chart. I have some stuff that needs testing and some fixes in my stash so I'll probably very soon publish 0.9.1 with this update so that bar chart can also use axes dynamically. For line charts you can use this feature and check the documentation here: http://gionkunz.github.io/chartist-js/getting-started.html#switching-axis-type
:tada:
Hi, I using 0.9.1 has the time interval feature done yet? thanks
Hi, you can already use x / y data and a timestamp to plot a chart, however, there is some manual effort involved in creating the ticks for you chart. This will be solved once we have a full fledged TimeAxis implemented.
Check this example with Dates and a FixedScaleAxis: http://jsbin.com/lokozu/edit?html,css,js,output
:+1: great! Thanks a lot :dancers:
+1 - this would be very handy