Hi Suyash,
Thank you for the great help. I would never have this realized.
Hi,
One problem, everything works fine as long as I use your CSV file. If I change this to one of my files I receive following error:
here is my: CSV
The difference that I see is a “carriage return” in my file after each row. I cannot change this as the CSV is generated.
Thanks for any help!
That’s absolutely perfect, exactly what I need.
Thanks a lot!
Hi Suyash,
Thank you for all your effort!
It is much simpler as you think. I have made a small picture how it can look:
I can do some styling afterward with all your tools and options.
The most important thing is to have only the last row of data. Because I need a lot of this “widgets” in a Dashboard.
Hope this helps to understand my needs.
Hi,
My file looks like this:
Date Sensor (S11) Sensor Temperature (S12) Sensor (S21) FlowMeter Total (D2) Output (A1) Output (A2) CCond Temp pH Flowmeter Retrans Prop
µS/cm °F gal % % % %
11/16/2017 00:10:00 880 69.7 8.32 0 8.8 65.8 4 12
11/16/2017 00:20:00 881 69.7 8.31 0 8.8 65.8 4 12
11/16/2017 00:30:00 882 69.6 8.32 0 8.8 65.9 4 12
11/16/2017 00:40:00 884 69.5 8.32 0 8.8 66 4 12
…..
….
11/16/2017 01:40:00 885 69.2 8.32 0 8.8 66.2 4 12
Link to a sample CSV:
I have a line chart for this which works perfect!
For some kind of Dashboard, I would need only the LAST row from this file
with all titles like “Date” “sensor (S11)” and left (Y-Axis) and only the values from the last row on the X-Axis.
Like this:
Date: 11/16/2017 00:10:00
Sensor(S11): 880
Sensor Temperature (S12): 69,9
..
and so on
..
I hope this helps
thank you!
I see you have used:
minValue.setMonth(minValue.getMonth() – 1);
is there also function for “week” and “day” available, like:
minValue.setWeek(minValue.getWeek() – 2);
Thank you
Thank you for the fast response!
Great!! Thank you very much!
Great!! thanks a lot
Last question:
How can I combine your code with this one:
function getDataPointsFromCSV(csv) {
var dataPoints, csvLines, points;
dataPoints = csvLines = points = [];
csvLines = csv.split(/[\r?\n|\r|\n]+/);
for (var i = {param_chartStart}; i < csvLines.length; i++)
if (csvLines[i].length > 0) {
points = csvLines[i].split(“,”);
chart.options.data[0].dataPoints.push({x: new Date(points[0]), y: parseFloat(points[1])});
chart.options.data[1].dataPoints.push({x: new Date(points[0]), y: parseFloat(points[2])});
chart.options.data[2].dataPoints.push({x: new Date(points[0]), y: parseFloat(points[3])});
chart.options.data[3].dataPoints.push({x: new Date(points[0]), y: parseFloat(points[4])});
chart.options.data[4].dataPoints.push({x: new Date(points[0]), y: parseFloat(points[5])});
chart.options.data[5].dataPoints.push({x: new Date(points[0]), y: parseFloat(points[6])});
}
}
Thanks!
Thank you very much Suyash!
Anyone has any ideas??
Hi,
yes, it should be a multi-series stepLine chart. I would like to have “on” acting as 1 and “off” as zero.
How can I do this?
Many thanks for this :)