1

I cannot write English very well, because I'm not a native.

My problem is this: I'm working to display a time series as a bar chart. I want a chart like the XYBarChartDemo1.java that combines aspects of BarChart and XYPlot. Especially, I want that the charts _x_-axis shows time usingHour, notYear. For example, the charts category has to show that value like 13:00, 14:00, 15:00 (at 1 hour intervals). How can I make that work?

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
kww1023
  • 23
  • 5
  • Which of the [JFreeChart Samples](http://www.jfree.org/jfreechart/samples.html) is most like what you want? – trashgod Jan 10 '12 at 02:29
  • Excellent. You can edit your question for clarification. See also the `JFreeChart` tag [info](http://stackoverflow.com/tags/jfreechart/info). – trashgod Jan 11 '12 at 00:47
  • Wow!! Thank you for your attention. I want a chart like the "XYBarChartDemo1.java". It consists of the 'BarChart' and 'XYPlot'. Especially I want that the chart`s x-Axis is time Axis. ...like 13:00, 14:00 ~ 15:00..not Year. For example, The chart`s category has to show that value.. ...like 13:00, 14:00 ... 15:00...(1 hour interval) And the chart has to have that value.. ...like 13:00, 13:10, 13:20,...15:00...(10 minute interval) Hmm. in short.. I want to hide the some category label. or I want to show the special category label. How can I do work? Sorry for my poor English. – kww1023 Jan 11 '12 at 08:44

1 Answers1

1

It sounds like you want ChartFactory.createXYBarChart(). For hourly data, use Hour for your RegularTimePeriod, as shown here using Day.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045