自定义字幕位置-JFreeChart [英] Customize subtitle position - JFreeChart

查看:108
本文介绍了自定义字幕位置-JFreeChart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能在图表底部,图表下方而不是标题下方放置JFreeChart字幕.

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

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.

提前谢谢!

乔伊

推荐答案

在此示例,以下 TextTitle 似乎可以正常工作.

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));

这篇关于自定义字幕位置-JFreeChart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆