Home Forums Chart Support stepLine with two data sets and two Xaxis

# stepLine with two data sets and two Xaxis

Viewing 10 posts - 1 through 10 (of 10 total)
• #28962

I am really excited about the possibilities of the package.

In one case I use stepLine.
Question 1:
how do I have to specify the times so that the two axes X1 and X2 have the same position / division.
I have the time range 0,0,0 – 24,0,0; For some curves, the start and end points are not at the same x position because the axes are different. The deviation is often really large.

If I use 0,0,0 – 23,59,59 the deviation is much bigger although the value is ok in sql

Please give me instructions how I should send the data and hard copy for assessment.

#28977

Can you kindly create a JSFiddle reproducing the issue you are facing and share it with us along with the sample data and a brief description of your requirement so that we can look into the code, understand the scenario better and help you out?

Shashi Ranjan
Team CanvasJS

#29021

chart1:
“[{x:new Date (2020,03,12,0,0,0),y:1.229},{x:new Date (2020,03,12,09,12,27),y:1.139},{x:new Date (2020,03,12,18,04,47),y:1.239},{x:new Date (2020,03,12,24,0,0),y:1.239}]”

“[{x:new Date (2020,03,16,0,0,0),y:1.229},{x:new Date (2020,03,16,06,45,07),y:1.279},{x:new Date (2020,03,16,08,59,09),y:1.129},{x:new Date (2020,03,16,12,15,13),y:1.129},{x:new Date (2020,03,16,20,51,32),y:1.229},{x:new Date (2020,03,16,24,0,0),y:1.229}]”

chart2:
“[{x:new Date (2020,03,12,0,0,0),y:1.199},{x:new Date (2020,03,12,09,12,27),y:1.109},{x:new Date (2020,03,12,18,04,47),y:1.209},{x:new Date (2020,03,12,24,0,0),y:1.209}]”

“[{x:new Date (2020,03,16,0,0,0),y:1.199},{x:new Date (2020,03,16,06,45,07),y:1.259},{x:new Date (2020,03,16,08,59,09),y:1.109},{x:new Date (2020,03,16,12,15,13),y:1.099},{x:new Date (2020,03,16,20,51,32),y:1.199},{x:new Date (2020,03,16,24,0,0),y:1.199}]”

chart3:
“[{x:new Date (2020,03,12,0,0,0),y:1.159},{x:new Date (2020,03,12,09,12,27),y:1.059},{x:new Date (2020,03,12,18,04,47),y:1.159},{x:new Date (2020,03,12,24,0,0),y:1.159}]”

“[{x:new Date (2020,03,16,0,0,0),y:1.149},{x:new Date (2020,03,16,06,45,07),y:1.159},{x:new Date (2020,03,16,08,59,09),y:1.049},{x:new Date (2020,03,16,12,15,13),y:1.049},{x:new Date (2020,03,16,20,51,32),y:1.149},{x:new Date (2020,03,16,24,0,0),y:1.149}]”

#29022

file:///C:/Users/franz/Pictures/Screenpresso/2020-04-21_07h19_59.png

#29057

Can you kindly create a sample project reproducing the issue and share it with us over Google-Drive or Onedrive along with the sample data so that we can look into the code, run it locally to understand the scenario better and help you resolve?

From what we have observed, sometimes things get delayed mostly when we are not able to reproduce the issue or not able to understand the exact requirements or the solution that we provide may not work properly due to the variation in chart-options being used by you and us.

Having a sample project helps us in figuring out the issue and suggesting an appropriate solution accordingly.

Shashi Ranjan
Team CanvasJS

#29105
#29112

The range of an axis (minimum and maximum) depends on the range of data being attached to that axis and not just based on x-values of first and last dataPoints. If you like to match the range of both primary and secondary axes, you can do so by setting minimum and maximum as per your requirements. Please take a look at this updated sample.

Shashi Ranjan
Team CanvasJS

#29113

Hello Shashi,
thanks for your support; but in my opinion it is still not quite right.
I have a hard copy and an extended program on onedrive. The hard copy shows that both curves are not correct. In the second curve I deleted minimum and maximun again. So you can see that in the first curve (with minimum and maximum) the Y values are not displayed correctly!
I have no idea why these values cause problems. Countless other values with the same program are displayed absolutely correctly.

Franz

#29171

We are looking into your query and will get back to you at the earliest.

Shashi Ranjan
Team CanvasJS

#29201

There seems to be an issue with the combination of primary and secondary x-axis along with setting minimum and maximum to the primary axis. Having both axes as primary seems to be working fine, which you can use at this point of time.

Shashi Ranjan
Team CanvasJS

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.