Combining XYPlot and TimeSeries elements in JFreeChart

前端 未结 1 1491
感动是毒
感动是毒 2020-12-21 22:35

I am interested in making a sort of hybrid between an XY Chart and Time Series in JFreeChart, where the x-axis is some SimpleDateFormat element (say, \"yyyy-MM-dd HH:mm:ss.S

相关标签:
1条回答
  • 2020-12-21 23:37

    You'll need to combine several elements to get the desired effect:

    • Start with ChartFactory.createXYBarChart(), as shown below and here.

    • Use a DateAxis for the domain axis, as shown here.

    • Use setDateFormatOverride() on the domain axis to apply your SimpleDateFormat.

    • Use a SymbolAxis for the range axis to replace integer values with your symbols, as shown here and here.

    0 讨论(0)
提交回复
热议问题