Hi,
i need to know if it's possible to change the horizontal legende and instead of having the value under the bar to have a text?
Thanks in advance
Legende with VerticalBarChart
Re: Legende with VerticalBarChart
Yes, i need to rename it in order to present this graph like an histogram, for example:
First Bar -> 0-10
2nd Bar -> 11-20
3th bar -> 21-30
First Bar -> 0-10
2nd Bar -> 11-20
3th bar -> 21-30
Re: Legende with VerticalBarChart
Assuming I understand you right, you just have to customize the CategoryDataset a bit. The categories are the "names" below the bars.
Create your own, e.g.:
public class GraphData extends AbstractSeriesDataset implements CategoryDataset
and implement some required functions, such as getCategories() which returns all the Strings or whatever you want to see below the bars.
Create your own, e.g.:
public class GraphData extends AbstractSeriesDataset implements CategoryDataset
and implement some required functions, such as getCategories() which returns all the Strings or whatever you want to see below the bars.
Re: Legende with VerticalBarChart
Thx, i succeed of doing that i want, but i'm now facing an other problem: my bar are not sorted correctly, example:
Table
-------
Value || Id
12 || 1
16 || 2
23 || 3
29 || 4
16 || 5
12 || 6
My sql query is:
Select Id, Value from Table order by Id;
With SQL Plus, i've no problem, but when i draw the graph, it's completly mixed, like an order 2 - 3 - 5 - 1 - 6 - 4
Any ideas?
Table
-------
Value || Id
12 || 1
16 || 2
23 || 3
29 || 4
16 || 5
12 || 6
My sql query is:
Select Id, Value from Table order by Id;
With SQL Plus, i've no problem, but when i draw the graph, it's completly mixed, like an order 2 - 3 - 5 - 1 - 6 - 4
Any ideas?
Re: Legende with VerticalBarChart
ok, i found my answer here:
http://www.object-refinery.com/phorum-3 ... 432&t=3432
http://www.object-refinery.com/phorum-3 ... 432&t=3432