Customize subtitle position - JFreeChart

雨燕双飞 提交于 2019-11-28 06:10:37

问题


I want to know if it is possible to put a JFreeChart subtitle in the bottom of the chart, under the chart, and not under the Title.

What I want to do is illustrated on these images:

http://i.stack.imgur.com/AmPJ8.jpg

and

http://i.stack.imgur.com/VBfvL.jpg.

I just tried almost everything and cannot do this.

I am using subtitle insted of legend, because legend is presented with a red square, indicating the color of the series shown on the graphics.

Thanks in advance!

Joey


回答1:


In this example, the following TextTitle appears to work.

chart.addSubtitle(new TextTitle(new Date().toString(),
    new Font("Dialog", Font.ITALIC, 14), Color.black,
    RectangleEdge.BOTTOM, HorizontalAlignment.CENTER,
    VerticalAlignment.BOTTOM, RectangleInsets.ZERO_INSETS));



来源:https://stackoverflow.com/questions/6933187/customize-subtitle-position-jfreechart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!