-
Notifications
You must be signed in to change notification settings - Fork 34
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
Data does not support the Point structure #15
Comments
Ah, I have found LineScatterDataset - looks like it does the job, thanks |
Unfortunately, LineScatterData only works if the X axis is a number. I am using different data - e.g. TimeStamps. Here's an example of the problem with day's of the week. It works in JS but currently not possible to do: var data = { |
Hi @rodneyjoyce, do you have a link to the chart.js documentation for this? Am happy to update this but would be good to make sure I include all possible datatypes. |
Hi @mattosaurus . On this link, http://www.chartjs.org/docs/latest/charts/line.html, scroll down to "Data Structure" and you'll see the other format: |
I've updated the x and y properties of LineScatterData to be strings, if they parse as a double then the value will be output without quotes, if not then the original string be output. I'm not sure this is the best way to do it as I imagine that most values for these will be doubles so these will now need to be converted to strings but I can't think of a better solution. This has been published now, let me know if you have any better ideas. |
Ok, I'll try it out now and let you know, thanks. |
Works great, thanks |
Hi,
I'm working on a graph that has 2 lines and a different number of point for each series.
If a List is used then the X-axis positions are ordinal, which means the graph is wrong - the JS version supports a Point.
For example:
Labels on X axis = 1,2,3,4,5
Data 1: x=3,y=20
Data 2: x=1,y=6, x=2,y=7,x=5,y=10
I'll have a look at the source to see if this could be supported easily..
The text was updated successfully, but these errors were encountered: