Re: Split Values with JFreeChart ?
From: ElephantWalker (elephantwalker_at_free.fr)
Date: 08/19/04
- Next message: Babu Kalakrishnan: "Re: Invisible Deadlock"
- Previous message: Christian Kaufhold: "Re: automatic scrolling when inserting a new line to JTextPane"
- In reply to: Rogan Dawes: "Re: Split Values with JFreeChart ?"
- Next in thread: Babu Kalakrishnan: "Re: Split Values with JFreeChart ?"
- Reply: Babu Kalakrishnan: "Re: Split Values with JFreeChart ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Aug 2004 08:53:35 -0700
Rogan Dawes <discard@dawes.za.net> wrote in message news:<cfhuuu$ui2$3@server4.gts.cz>...
> ElephantWalker wrote:
>
> > Hi all,
> >
> > I'm in charge of writing an application that can display a chart, and
> > I'm supposed to use JFreeChart.
> >
> > After watching the sample codes and tryed some stuff, it seems to me
> > that this tool is very powerful for displaying multiple kind of charts
> > from the time you give it a single value.
> >
> > What I want to do is to display a very simple chart (Vertical Bars)
> > with some split values.... I want it to be seen on the chart.
> >
> > For example, a simple matrix like this :
> >
> > Serie1 Serie2
> > Category1 12.0 8.0
> > Category2 10.0 9.0
> >
> >
> > But the value 12.0 is in fact (8.0 + 4.0), so the bar displaying this
> > value on the chart would have two colors, each one corresponding to a
> > value.
> >
> > Anyone got any idea on how to do this ??
> >
> > Thanx.
>
> Your series is actually?
>
> Serie1 Serie2
> Category1 4.0 8.0
> Category2 1.0 9.0
>
> And you want to display it using a stacked bar chart?
>
> The trick is to know how to ask the right questions . . . ;-)
>
> Rogan
Hi Rogan,
Thanx for taking some time to read my request. You're right, the trick
is to know how to ask the right question :) so here it is :
>From the following dataset :
double[][] data = new double[][]
{{8.1, 6.1, 5.7, 5.6, 5.3, 5.2, 5.1, 5, 4.9, 4.8},
{3.9, 3.9, 3.7, 3.7, 4, 4, 4.6, 4.4, 3, 4},
{1.1, 1.0, 2.0, 1.5, 1.2, 1.4, 1.6, 2.1, 1.2, 0.9}};
I build a perfect vertical bart chart, divided in 10 categories, and
each category has 3 values represented in vertical bars.
Something like this (I'm not much of a drawer ;p) :
|
|
|
| __
| ||
| || __
| || __ ||
| ||__|| ||
| |||||| || __
| |||||| ||__||
| |||||| ||||||
| |||||| ||||||
|_______||||||__||||||__... and so on...
Cat1 Cat2 CatX..... Cat10
good.
Now here is the tricky question :
How do I make each of the bar split into sub-values ?
I don't want the values of a single category (in our example, 3
values) to be added and create a single bar, no, I want each bar of
each category to be detailed in some sub-values.
Something like that (each bar is a kindof stacked bar) :
|
|
|
| __
| ||
| || __
| __ __ ||
| ||__|| __
| |||||| || __
| ||__|| ||__||
| __|||| ||||__
| ||||__ ____||
|_______||||||__||||||__... and so on...
Cat1 Cat2 CatX..... Cat10
- Next message: Babu Kalakrishnan: "Re: Invisible Deadlock"
- Previous message: Christian Kaufhold: "Re: automatic scrolling when inserting a new line to JTextPane"
- In reply to: Rogan Dawes: "Re: Split Values with JFreeChart ?"
- Next in thread: Babu Kalakrishnan: "Re: Split Values with JFreeChart ?"
- Reply: Babu Kalakrishnan: "Re: Split Values with JFreeChart ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|