Closed melissamcewen closed 3 years ago
No it did not work. We have forked and added support for time series. You can get it here before (if at all) the original author adds it. https://github.com/SigloTech/chartjs-plugin-trendline
Thanks for this great plugin! I am working with time series data in the format like:
data: [{ x: "01/04/2014", y: 175 }, { x: "01/10/2014", y: 175 }, { x: "01/04/2015", y: 178 }, { x: "01/10/2015", y: 178 }]
For time series lines and I can't seem to figure out how to get this Plugin to work. I get
chartjs-plugin-trendline.min.js:1 Uncaught TypeError: Cannot read property 'getPixelForValue' of undefined
Agreed, great plug-in!
I am able to plot the timestamp JSON data, gathered via AJAX, along the X-axis and the 10 numeric datum on the Y-axis, without issue using chartjs + nonforked version of the trendline plugin, as is.
{
"chartData": [{
"timestamp": "2019-03-07T08:00:04.340",
"branch": "6ATL",
"done": 0,
"received": 1,
"diag": 19,
"revised": 18,
"nextq": 21,
"shop": 24,
"parts": 12,
"pickup": 17,
"offlot": 10,
"trucks": 112
},
{
"timestamp": "2019-03-07T09:00:04.477",
"branch": "6ATL",
"done": 0,
"received": 2,
"diag": 18,
"revised": 18,
"nextq": 20,
"shop": 25,
"parts": 12,
"pickup": 18,
"offlot": 10,
"trucks": 113
},
{
"timestamp": "2019-03-07T10:00:03.996",
"branch": "6ATL",
"done": 0,
"received": 2,
"diag": 18,
"revised": 18,
"nextq": 20,
"shop": 26,
"parts": 11,
"pickup": 18,
"offlot": 9,
"trucks": 113
}
]
}
No it did not work. We have forked and added support for time series. You can get it here before (if at all) the original author adds it. https://github.com/SigloTech/chartjs-plugin-trendline
@nilstate Please make a pull request.
Can not get worked for me but it would be very interesting if it works with time series.
Please try the new version v0.2.1. Maybe it will solve your problem.
Thanks for this great plugin! I am working with time series data in the format like:
For time series lines and I can't seem to figure out how to get this Plugin to work. I get
chartjs-plugin-trendline.min.js:1 Uncaught TypeError: Cannot read property 'getPixelForValue' of undefined