You must be logged in to post your query.
Home › Forums › Chart Support › Canvasjs chart and csv – epoch conversion
Hi all,
(previous post without JSfiddle link can be deleted)
I have some values that are generated and stored in a csv-file each with his own timestamp.
I experimented with the code that generates a graph, but the conversion of time on the X-axis is not working correct…
What has to be changed in the code so I see the correct hour instead of the milliseconds?
Thanks in advance!
Gunther
Gunther,
It seems like you are passing x-value as ‘time’. Passing it as ‘x’ should work fine in your case. Please take a look at this updated JSFiddle.
—
Vishwas R
Team CanvasJS
test reply
(I tried to reply but it was not visible…hopefuly this works with the links ;-))
Thanks Vishwas for your reply…
I also tried with the variable x, but the strange thing is, this seems to work in JSfiddle but does not work under normal site environnement. The graph-outline is rendered but no graph is visible. I’m shure that the datastream is read from the csv because the y-axis auto-adapts to the highest value.
This is your code here:
users.telenet.be/-knudde-/test/chart9.html
This is your code but ‘x’ is changed back to ‘time’.
users.telenet.be/-knudde-/test/chart8.html
Thanks for your support.
BR Gunther
Hi Vishwas,
Thanks for you reply!
I already tested also with the x-value, the strange thing is;
This graph seems to work in JSfiddle but does not work online. The graph outlines are rendered but no graph is displayed… strange!
I’m quite shure that the datastream is read, because the Y-axis auto-adapts to its highest value.
Do you have any ideas what the problem can be?
Tnx Gunther
I’m running your code in this graph;
If I only change ‘x’ to ‘time’ just for test, this works;
Hi Vishwas,
Thanks for you reply!
I already tested also with the x-value, the strange thing is;
This graph seems to work in JSfiddle but does not work online. The graph outlines are rendered but no graph is displayed… strange!
I’m quite shure that the datastream is read, because the Y-axis auto-adapts to its highest value.
Do you have any ideas what the problem can be?
Tnx Gunther
I’m running your code in this graph;
If I only change ‘x’ to ‘time’ just for test, this works;
Hi Vishwas,
Thanks for you reply!
I already tested also with the x-value, the strange thing is;
This graph seems to work in JSfiddle but does not work online. The graph outlines are rendered but no graph is displayed… strange!
I’m quite shure that the datastream is read, because the Y-axis auto-adapts to its highest value.
Do you have any ideas what the problem can be?
Tnx Gunther
I’m running your code in this graph;
If I only change ‘x’ to ‘time’ just for test, this works;
Hi Vishwas,
Thanks for you reply!
I already tested also with the x-value, the strange thing is;
This graph seems to work in JSfiddle but does not work online. The graph outlines are rendered but no graph is displayed… strange!
I’m quite shure that the datastream is read, because the Y-axis auto-adapts to its highest value.
Do you have any ideas what the problem can be?
Tnx Gunther
I’m running your code in this graph; http://users.telenet.be/-knudde-/test/chart9.html
If I only change ‘x’ to ‘time’ just for test, this works; http://users.telenet.be/-knudde-/test/chart8.html
Gunther,
Can you kindly share Sample Project reproducing the issue over Google-Drive or Onedrive along with sample CSV so that we can look into the code, run it locally to understand the scenario better and help you resolve?
—
Vishwas R
Team CanvasJS
Hello Vishwas,
(Sorry for all the reply’s, but they were not visible at that moment)
I have a simple example at my google drive were you can download it from:
BR Gunther
Gunther,
Your CSV seems to have extra ” (quote) in the beginning and to the end. Removing it should work fine in this case. Please take a look at this updated sample project.
—
Vishwas R
Team CanvasJS
Stupid… but learning…
Thanks a lot!
BR Gunther
You must be logged in to reply to this topic.