当前位置: 代码迷 >> Java相关 >> jfreechart 怎么在柱状图中画一条平均线
  详细解决方案

jfreechart 怎么在柱状图中画一条平均线

热度:6703   发布时间:2013-02-25 21:48:25.0
jfreechart 如何在柱状图中画一条平均线
1.如下图如何在柱状图上加一条横线

2.如何设置X轴坐标上的文字垂直显示,现在通过setCategoryLabelPositions(角度)可将文字垂直显示,但是字是躺着显示的,有没有更好的办法
3.默认图例的位置是在图的下方,如何设置显示在图的的右边

------解决方案--------------------------------------------------------

------解决方案--------------------------------------------------------
去官网看看有无这种实现的例子
google api
------解决方案--------------------------------------------------------
没用过 帮顶
------解决方案--------------------------------------------------------
Java code
        // couldn't get the label above to appear in front, so using an            // annotation instead...            CategoryTextAnnotation a = new CategoryTextAnnotation("Minimum grade to pass", "Robert", 0.71);           a.setCategoryAnchor(CategoryAnchor.START);           a.setFont(new Font("SansSerif", Font.PLAIN, 12));           a.setTextAnchor(TextAnchor.BOTTOM_LEFT);           plot.addAnnotation(a);