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
How to plot X/Y Specific data #64
Comments
The {
type: 'line',
data: {
datasets: [{
data: [
{x: '2019-02-01 09:30:15', y: -0.11700000},
{x: '2019-02-01 09:30:20', y: -0.14400000},
// ...
]
}]
},
options: {
scales: {
xAxes: [{
type: 'realtime'
}]
}
}
} |
Hello @nagix Thanks for the answer, but I can not figure out how to output the proper values. I used the following code: https://jsfiddle.net/kevinmamaqi/htjkyu8s/35/ to transform each X value in a random (but ordered) milliseconds format, but nothings plots out. Could you take a look please? |
First of all, this plugin shows the latest data points for the duration specified by Secondly, new data points need to be appended continuously because the chart is scrolling and data will be removed once it goes off the chart. See the If your use case is to replay the data stream with the past timestamps, see also #40. |
How to show x/y values randomly while still moving the realtime animation? (x,y both are integer/floats not a time) |
@lianglee You mean each datapoint has If you just want to animate |
Closing as answered. |
Hello,
I have a huge array (sample below) with X and Y values and would like to plot the Y values on the X time, although I can not get my head around it. Any help please?
var dataPoints = [{x:0.000,y:-0.11700000},{x:0.003,y:-0.14400000},{x:0.007,y:-0.17500000},{x:0.010,y:-0.19200000},{x:0.013,y:-0.19900000},{x:0.017,y:-0.20500000},{x:0.020,y:-0.21000000},{x:0.023,y:-0.21400000}]
The text was updated successfully, but these errors were encountered: