Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scatter Chart type v2: Data Structure for 'Time' #1352

Closed
sivix opened this issue Aug 3, 2015 · 1 comment
Closed

Scatter Chart type v2: Data Structure for 'Time' #1352

sivix opened this issue Aug 3, 2015 · 1 comment

Comments

@sivix
Copy link

sivix commented Aug 3, 2015

Hi, I'm using a fork from the user @dima117 http://dima117.github.io/Chart.Scatter.
In the v2 version of chartjs how the data structure will support Date/Time for x-axis? is something we need to manage externally and pass the converted x-values or will be managed by the library like the Chart.scatter fork?

@sivix sivix changed the title Scatter Chart type: Data Structure for 'Time' Scatter Chart type v2: Data Structure for 'Time' Aug 3, 2015
@etimberg
Copy link
Member

V2 now has a time scale. Using the time scale you can pass date strings or date objects in as X coordinates. Moment.js must be included as it provides the actual date parsing functionality. The scale also supports rounding to different time units, and control over how the labels are formatted.

Once #1542 is merged, the time axis will also support passing data as arrays of objects containing x and y attributes, exactly like the scatter chart in v2.

The line-time-scale.html sample file demos the use of the new axis type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants