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

New chart type: Time Series #1059

Closed
arnoutaertgeerts opened this issue Apr 12, 2015 · 16 comments
Closed

New chart type: Time Series #1059

arnoutaertgeerts opened this issue Apr 12, 2015 · 16 comments

Comments

@arnoutaertgeerts
Copy link

I think one of the main chart types that is missing in Chartjs is the Time Series chart. This chart type would allow for easy plotting of time series where the x-axis consists of an array of Date objects.

The main differences with the Line chart type are:

  • Non-equidistant points for the x-axis.
  • x-labels independent from the data-points.

The main features could then be:

  • Use Date objects for the x-axis.
  • Create a (linear) timeline based on the oldest and the newest Date.
  • Automatically place the points on the x-axis at the right place on the time line.
  • Choose a x-label format such as seconds, minutes or days.

The functionality would ideally mimic the highstock time series functionality.

I'm interested in developing this chart type but could use help. We could start from the same code that is used to create the Line chart type.

Could I get some input here on wether you guys think this is useful, how to approach this task and which other features could be included?

@dima117
Copy link
Contributor

dima117 commented Apr 12, 2015

I has developed scatter chart plugin for the chart.js library. It supports datetime scale.
http://dima117.github.io/Chart.Scatter/
Maybe it will be interested for you.

@arnoutaertgeerts
Copy link
Author

@dima117 That is very interesting and already solves some problems! Thanks for the tip!

@dima117
Copy link
Contributor

dima117 commented Apr 12, 2015

@arnoutaertgeerts Feel free to contact me, if you will have any questions or suggestions.

@etimberg etimberg added this to the v2.0 milestone May 12, 2015
@derekperkins derekperkins modified the milestones: v2.0, Rewrite axis/scale code Jun 5, 2015
@gnitnuj
Copy link

gnitnuj commented Oct 16, 2015

@arnoutaertgeerts, just wondering if you've had a chance to write a series line chart extension? It's something I've been considering doing as well.

@tannerlinsley
Copy link
Contributor

Take a look at v2.0-dev. It has a new time scale that kicks butt

@gnitnuj
Copy link

gnitnuj commented Oct 16, 2015

oh man. thats awesome! i took a glance at the v2.0 milestone but must have overlooked the time scale stuff

@iroller
Copy link

iroller commented Oct 18, 2015

@tannerlinsley could you share a working example of time scale using the latest alpha?

@tannerlinsley
Copy link
Contributor

There should be a time-scale sample in the example directory
On Sat, Oct 17, 2015 at 10:23 PM Anton Koldaev [email protected]
wrote:

@tannerlinsley https://github.com/tannerlinsley could you share a
working example of time scale using the latest alpha?


Reply to this email directly or view it on GitHub
#1059 (comment).

@iroller
Copy link

iroller commented Oct 18, 2015

I tried that, doesn't seem to be working here. It's just empty

@tannerlinsley
Copy link
Contributor

Are you using the built alpha-4 release or the latest 2.0-dev branch? I would suggest pulling the latest changes from 2.0-dev branch, running gulp build, and then trying the line-time-scale.html file. Works great for me on both, but just to be sure...

@iroller
Copy link

iroller commented Oct 18, 2015

Perfect, it works now. Thank you 👍

@tannerlinsley
Copy link
Contributor

No problem! I'm going to close this issue unless there's anything else?

@AnniekJose
Copy link

Okey I'm totally new to this so maybe someone can explain how I can get this latest 2.0 dev branch? Cause I am also looking for some kind of time scale for in my charts.

@AnniekJose
Copy link

@francisdb okey thanks! and then put them in my original Chart.js file? should they replace the old Chart.min.js and Chart.js files or should they co-excist in another folder (the v2.0-dev folder).

@francisdb
Copy link

You should replace them but likely the api will not be compatible so this will not be a simple drop in replacement. And since it's a development version things might change over time...

On the other hand I don't think it's a good idea to use dev versions if you are not used to playing with this kind of stuff.

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

9 participants