Skip to main content



      Home
Home » Archived » BIRT » Use of Pie chart
Use of Pie chart [message #257114] Thu, 04 October 2007 14:13 Go to next message
Eclipse UserFriend
Hi everyone,

I am stuck trying to produce a pie chart from the following sample data.

week product1 product2 product3
1 4000 2000 3399
2 5000 2330 2100

I want to generate a pie chart displaying the 3 products as slices
depending on the week.

So I built a data set with a parameterized query and the week as input
parameter. So for week 1 I would get 4000 for product 1, 2000 for
product 2, and 3399 for product 3. Now I want to display those numbers
as slices in the diagram, but I dont know what to put in for slize size
definition and category. Usually I can drag in the columns, however in
this case the categories definition is not contained in a column but is
the column names. Am I missing sth.

I know if I reorganize my table so that week1 and week2 is a column and
the products act as key, I can simple drag in the key column as category
and the week column as slice definition. However I need the table this
way as products are fixed and weeks grow ...

Any help is appreciated.

Thx
Philipp
Re: Use of Pie chart [message #257302 is a reply to message #257114] Fri, 05 October 2007 04:27 Go to previous messageGo to next message
Eclipse UserFriend
You could try a union query

select product1
from table1
where week=1
union
select product2
from table1
where week=1
union
select product3
from table1
where week=1;

This will give you only one column with all your product values for week 1.
Otherwise you can try with the SQL transform keyword on your db if it
supports it.

Thanks,

David

"Philipp Tiedt" <philipp.tiedt@web.de> wrote in message
news:fe3agf$toq$1@build.eclipse.org...
> Hi everyone,
>
> I am stuck trying to produce a pie chart from the following sample data.
>
> week product1 product2 product3
> 1 4000 2000 3399
> 2 5000 2330 2100
>
> I want to generate a pie chart displaying the 3 products as slices
> depending on the week.
>
> So I built a data set with a parameterized query and the week as input
> parameter. So for week 1 I would get 4000 for product 1, 2000 for product
> 2, and 3399 for product 3. Now I want to display those numbers as slices
> in the diagram, but I dont know what to put in for slize size definition
> and category. Usually I can drag in the columns, however in this case the
> categories definition is not contained in a column but is the column
> names. Am I missing sth.
>
> I know if I reorganize my table so that week1 and week2 is a column and
> the products act as key, I can simple drag in the key column as category
> and the week column as slice definition. However I need the table this way
> as products are fixed and weeks grow ...
>
> Any help is appreciated.
>
> Thx
> Philipp
Re: Use of Pie chart [message #257307 is a reply to message #257302] Fri, 05 October 2007 05:11 Go to previous messageGo to next message
Eclipse UserFriend
Thx David,

I will try that approach.

Does that mean that for pie charts I have to have my data in the format of
lets say "key - value" columns, where the value column name cant be used
as category ? So is it generally not possible to show a pie chart of
something like my example without remodelling the query ?

Philipp

David Michonneau wrote:

> You could try a union query

> select product1
> from table1
> where week=1
> union
> select product2
> from table1
> where week=1
> union
> select product3
> from table1
> where week=1;

> This will give you only one column with all your product values for week 1.
> Otherwise you can try with the SQL transform keyword on your db if it
> supports it.

> Thanks,

> David

> "Philipp Tiedt" <philipp.tiedt@web.de> wrote in message
> news:fe3agf$toq$1@build.eclipse.org...
>> Hi everyone,
>>
>> I am stuck trying to produce a pie chart from the following sample data.
>>
>> week product1 product2 product3
>> 1 4000 2000 3399
>> 2 5000 2330 2100
>>
>> I want to generate a pie chart displaying the 3 products as slices
>> depending on the week.
>>
>> So I built a data set with a parameterized query and the week as input
>> parameter. So for week 1 I would get 4000 for product 1, 2000 for product
>> 2, and 3399 for product 3. Now I want to display those numbers as slices
>> in the diagram, but I dont know what to put in for slize size definition
>> and category. Usually I can drag in the columns, however in this case the
>> categories definition is not contained in a column but is the column
>> names. Am I missing sth.
>>
>> I know if I reorganize my table so that week1 and week2 is a column and
>> the products act as key, I can simple drag in the key column as category
>> and the week column as slice definition. However I need the table this way
>> as products are fixed and weeks grow ...
>>
>> Any help is appreciated.
>>
>> Thx
>> Philipp
Re: Use of Pie chart [message #257408 is a reply to message #257307] Sat, 06 October 2007 03:42 Go to previous message
Eclipse UserFriend
Correct. See this enhancements in the works for the next release:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=162528

David

"Philipp Tiedt" <philipp.tiedt@web.de> wrote in message
news:184df95c249322c88895d6594b7a46c1$1@www.eclipse.org...
> Thx David,
>
> I will try that approach.
> Does that mean that for pie charts I have to have my data in the format of
> lets say "key - value" columns, where the value column name cant be used
> as category ? So is it generally not possible to show a pie chart of
> something like my example without remodelling the query ?
>
> Philipp
>
> David Michonneau wrote:
>
>> You could try a union query
>
>> select product1
>> from table1
>> where week=1
>> union
>> select product2
>> from table1
>> where week=1
>> union
>> select product3
>> from table1
>> where week=1;
>
>> This will give you only one column with all your product values for week
>> 1. Otherwise you can try with the SQL transform keyword on your db if it
>> supports it.
>
>> Thanks,
>
>> David
>
>> "Philipp Tiedt" <philipp.tiedt@web.de> wrote in message
>> news:fe3agf$toq$1@build.eclipse.org...
>>> Hi everyone,
>>>
>>> I am stuck trying to produce a pie chart from the following sample data.
>>>
>>> week product1 product2 product3
>>> 1 4000 2000 3399
>>> 2 5000 2330 2100
>>>
>>> I want to generate a pie chart displaying the 3 products as slices
>>> depending on the week.
>>>
>>> So I built a data set with a parameterized query and the week as input
>>> parameter. So for week 1 I would get 4000 for product 1, 2000 for
>>> product 2, and 3399 for product 3. Now I want to display those numbers
>>> as slices in the diagram, but I dont know what to put in for slize size
>>> definition and category. Usually I can drag in the columns, however in
>>> this case the categories definition is not contained in a column but is
>>> the column names. Am I missing sth.
>>>
>>> I know if I reorganize my table so that week1 and week2 is a column and
>>> the products act as key, I can simple drag in the key column as category
>>> and the week column as slice definition. However I need the table this
>>> way as products are fixed and weeks grow ...
>>>
>>> Any help is appreciated.
>>>
>>> Thx
>>> Philipp
>
>
Previous Topic:Dynamically Altering Chart's Grouping - Round 2
Next Topic:Java and DataSet Parameters
Goto Forum:
  


Current Time: Sun Jun 01 18:10:52 EDT 2025

Powered by FUDForum. Page generated in 0.04083 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top