【问题标题】:JFreeChart - Vertical Line ChartJFreeChart - 垂直折线图
【发布时间】:2012-10-09 03:15:28
【问题描述】:

您好如何创建像http://livedocs.adobe.com/flex/3/html/images/VerticalLine.png 这样的图表。使用 XY 绘图。提前致谢。

【问题讨论】:

    标签: jfreechart linechart


    【解决方案1】:

    许多图表允许您在相应的图表工厂中指定PlotOrientation,但createTimeSeriesChart() 不是其中之一。作为替代方案,您可以使用 source 作为指南创建自己的变体。

    附录:作为@Gavin cmets,PlotOrientation.VERTICAL 是`XYPlot 的默认值,所以你会做这样的事情(未经测试):

    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, null);
    plot.setOrientation(PlotOrientation.HORIZONTAL);
    

    【讨论】:

    • 更具体一点,您将寻找PlotOrientation.HORIZONTAL 以获取从屏幕顶部到底部绘制的图表。