Display column keys of stacked bar chart vertically in jFreeCharts

后端 未结 1 1964
萌比男神i
萌比男神i 2021-01-24 01:15

I am developing a javaEE application using jfreecharts. I successfully displayed my data using a stackedBarChart but the column keys (Y-axis labels) are not fully displayed beca

1条回答
  •  孤街浪徒
    2021-01-24 01:40

    You can use setCategoryLabelPositions() like they show here.

    CategoryPlot plot = (CategoryPlot) chart.getPlot();
    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90));
    

    0 讨论(0)
提交回复
热议问题