You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One would expect setXAxisMaxLabelCount() only alters the number of labels of the X axis and doesn't affect the number for Y axis.
Yet in HeatMapCharts that's not true.
e.g.
int N = 12;
java.util.List<Integer> xData = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
java.util.List<String> yData =
Arrays.asList("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
java.util.List<Number[]> data = new ArrayList<>();
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
data.add(new Integer[]{i, j, (i * 2 + j * 3) % 7});
}
}
HeatMapChart chart = new HeatMapChart(800, 600);
chart.addSeries("only", xData, yData, data);
chart.getStyler().setTheme(new XChartTheme());
chart.getStyler().setXAxisMaxLabelCount(5); // <---------------- they key line!
BitmapEncoder.saveBitmap(chart, "/tmp/chart.png", BitmapEncoder.BitmapFormat.PNG);
yields
The text was updated successfully, but these errors were encountered:
mccartney
changed the title
using setXAxisMaxLabelCount against a HeatMapChart alters boths axes
using setXAxisMaxLabelCount against a HeatMapChart alters both axes
Feb 5, 2021
One would expect
setXAxisMaxLabelCount()
only alters the number of labels of the X axis and doesn't affect the number for Y axis.Yet in HeatMapCharts that's not true.
e.g.
yields
The text was updated successfully, but these errors were encountered: