I'm trying to paint a chart with two X axis. Both of them will be Date axis. In the first X-axis, I want to display hours with a certain step. In the second one, I want to display the month with another step.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Miguel
Hello,
I'm trying to paint a chart with two X axis. Both of them will be Date axis. In the first X-axis, I want to display hours with a certain step. In the second one, I want to display the month with another step.
How could I do this?
This is the code about the X-axis:
var axis = chart1.getAxisX();
axis.getLabelsFormat().setFormat(cfx.AxisFormat.Time);
axis.setStep(19);
axis.getLabelsFormat().setCustomFormat("HH:mm");
chart1.getAxisX().getGrids().setInterlaced(false);
var axisX2 = new cfx.AxisX();
chart1.getAxesX().add(axisX2);
axisX2.setVisible(true);
axisX2.getLabelsFormat().setFormat(cfx.AxisFormat.Time);
axisX2.getLabelsFormat().setCustomFormat("MM-dd");
axisX2.getGrids().setInterlaced(false);
axisX2.getGrids().getMajor().setVisible(false);
axisX2.setPosition(cfx.AxisPosition.Far);
axisX2.setStyle(cfx.AxisStyles.Centered);
I only get to display de first X axis. Why I cant display nothing in the second one?
Thanks
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.