Hi everyone!
I’m totally new in using CanvasJS and I’m starting to edit some graph that I would like to use but I encountered some problems with it.
First, I’m using a line type of graph with a date xAxis. Could it be possible to make it start at the beginning of the graph? Because the first date on the xAxis is 01/06 (which is basically January 2006) and my first point is at the 30th May of 2006 (It’s 30/04 because I had to put 04 rather than 05 to have May) – (‘x: new Date(2006, 04, 30)
‘) so is it possible to make the graph start at the origine?
Furthermore, the yAxis has no type (Date, …), here is an exemple of one line:
dataPoints: [
{ x: new Date(2006, 04, 30), y: 100 },
{ x: new Date(2012, 05, 29), y: 148 },
{ x: new Date(2014, 05, 30), y: 220 },
{ x: new Date(2016, 05, 30), y: 230 },
{ x: new Date(2017, 07, 03), y: 255}
]
The graph automatically put the xAxis between 0 and 300. Is it possible to change those values manually and to put those in percentages? Same for the dates which are all 01/06, 01/07, … until 01/17 (january 2018), can I change those dates manually?
Then, I would also like to change the appearance of the line. I saw the random generator that made a huge and smooth line at the end of the ‘Axis Element’ chart tutorial, can I turn the verry squared line I have into this one? Or is it made by a lack of points? (I have like 6 points, I’ll have more than 2000 later on).
To finish with, as I said above, I will soon have like 2000 points to put on the graph. I will select them from the database. Is there a way, in PHP, to fill the points array with all those points without putting them one by one, the latest being added each time too?
Thanks for reading, I hope I didn’t make too many typos.
Best regards,
Tanguy.
-
This topic was modified 7 years, 3 months ago by ElToredo. Reason: I made a mistake in my typing