Apache POI add a Series name into LineChart

前端 未结 2 735
情深已故
情深已故 2020-11-28 16:16

I am creating a LineChart using Apache POI in Excel document. As far as I\'ve managed to achieve is in the below image:

2条回答
  •  爱一瞬间的悲伤
    2020-11-28 16:59

    From Apache POI version 3.16 onwards, use setTitleText("Title Name") instead. Also the correct class name is LineChartSeries not LineChartSerie. So, the above solution would look like:

    LineChartSeries chartSeries = data.addSeries(xs,ys);
    chartSeries.setTitleText("My Title");
    

    for Apache POI 3.16 onwards.

提交回复
热议问题