Reputation: 2948
We are already using JFreeChart in our product. But so far for all needed charts it was easy to find description and tutorials.
For new report we need to show bar chart
with all bars being located not by category but by the value on x-axis. Such as:
x-axis: time range between date1 and date2
y-axis: is cost in %currency%
So i need to put bars where each bar has specific date where date1 < date < date2 and cost which will define the heigh of bar.
Is there a way to do so in JFreeChart? Or any another free tool? Or any link to proper information about this?
Upvotes: 0
Views: 877
Reputation: 2948
Found it myself. Simple solution, so no wonder nobody answered this question. In short: to get empty space instead of bar, the bar value should be 0.
Upvotes: 1
Reputation: 205885
You may looking for ChartFactory.createXYBarChart()
, which uses an XYBarRenderer
. This example illustrates date formatting on the domain axis and currency formatting on the range axis.
Upvotes: 1