I'm having issues with X Axis labels not being properly shown when I use JChartFX to display hourly data as bar chart. JChartFX version is 7.5.6200 (tried also the earlier 5900).
The (hopefully) relevant parts of the code used for chart initialization are about the following:
...
var field = new cfx.FieldMap();
field.setName("myinfomonitor_ts");
field.setUsage(cfx.FieldUsage.XValue);
...
chart.getAxisX().getLabelsFormat().setCustomFormat("HH");chart.getAxisX().setStaggered(true);
//chart.getAxisX().setLabelAngle(45);
chart.getAxisX().setStaggered(true);
chart.getAxisX().setStep(1);
...
This produces an axis with only one visible label (see attached image). If I set the step to be 0.01, all labels are drawn as wanted, but this seems to be a bit of a hack. Resizing chart does not change the behavior. What might be going wrong?
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
timopu
Hello,
I'm having issues with X Axis labels not being properly shown when I use JChartFX to display hourly data as bar chart. JChartFX version is 7.5.6200 (tried also the earlier 5900).
Example snippet of the data:
The (hopefully) relevant parts of the code used for chart initialization are about the following:
This produces an axis with only one visible label (see attached image). If I set the step to be 0.01, all labels are drawn as wanted, but this seems to be a bit of a hack. Resizing chart does not change the behavior. What might be going wrong?
br,
Timo
Link to comment
Share on other sites
4 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.