Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Create a pie chart with 4 variables as source
Steven Jung
<p>Hey Birt Communtiy,<br>
</p>
<p>I hope my english is not so bad.</p>
<p> </p>
<p>My problem:</p>
<p> </p>
<p>I have a datas with with an Id. This Id show me the state of a maschine (on, off, stanby, service).</p>
<p>I add the time from every state to certain variable.</p>
<p>Now I need to represent this 4 Variables in a pie chart.</p>
<p>My first idea is to build a two-dimesional array (one for legend and one for the values) or two arrays.</p>
<p>How could i give my 4 variables to the pie chart. Pls dont link me to other forum post, because i looked for so many solutions but nothing work.</p>
<p> </p>
<p>My question: what could i do to say the pie chart that i want to represent this 4 variables (so i wont select something from data set, i want use this 4 variables; its not possible in birt to select them in series i think)</p>
<p> </p>
<p> </p>
<p>Would be really nice if someone could help me.</p>
<p> </p>
<p>I cant upload a rptdesign, so if you need this to understand my problem, maybe u give me your email.</p>
<p> </p>
<p> </p>
<p> </p>
<p>Greetings</p>
<p>Steven</p>
Find more posts tagged with
Comments
Clement Wong
<p>Sorry, I don't understand the part where you describe how your data is retrieved and how it is represented. What does your data look like? Can you attach a CSV of sample values?</p>
<p> </p>
<p>Also, maybe a mockup screenshot or drawing of what you would like the final output to look like?</p>
<p> </p>
<p>What version of BIRT are you using? Commercial, or open source BIRT?</p>
Steven Jung
<p>Okay the data is retrieved from other software.</p>
<p> </p>
<p>I want to know how i could represent 4 Variables in a pie chart, thats all.</p>
<p> </p>
<p>Maybe i discribed it bad, but i just wanna represent this 4 variables. In pie chart i just could select datasets and no variables.</p>
<p> </p>
<p> </p>
<p>Hope u could help and Thank You for your answer.</p>
Clement Wong
<p>Can you please share some sample data?</p>
<p> </p>
<p>I'm guessing here... so your actual data might look like the following?</p>
<pre class="_prettyXprint">
ID Date
1 01-01-2016
1 02-05-2016
...
2 01-05-2016
2 02-14-2016
...
3 01-02-2016
...
4 01-24-2016
...</pre>
<p>
And then you have a ID-State table?</p>
<pre class="_prettyXprint _lang-">
ID State
1 On
2 Off
3 Standby
4 Service
</pre>
<p>And your (aggregated) data might look like the following?</p>
<pre class="_prettyXprint">
State Total
On 10
Off 20
Standby 30
Service 40</pre>
<p>Then, you want a pie chart of the different states and their totals?</p>
<p> </p>
<p>If not, sample data would be helpful to understand your scenario.</p>
Steven Jung
<p>Hey Clement Wong this is nice that u take time for it.</p>
<p> </p>
<p>Yes u are right.</p>
<p> </p>
<p>And your (aggregated) data might look like the following?</p>
<p><span>State</span><span> </span><span>Total</span><br><span>
</span><br><span>On</span><span> </span><span>10</span><br><span>Off</span><span> </span><span>20</span><br><span>Standby</span><span> </span><span>30</span><br><span>Service</span><span> </span><span>40</span></p>
<p>Then, you want a pie chart of the different states and their totals?</p>
<p> </p>
<p>If not, sample data would be helpful to understand your scenario.</p>
<p> </p>
<p> </p>
<p> </p>
<p>
</p>
<p> </p>
<p> </p>
<p>i have this 4 variables and want it to represent in a pie chart. how is this possible.</p>
<p>Thanks for ur help.</p>
<p> </p>
<p>Grettings Steven</p>
Clement Wong
<p>You would just create two Data Sets for your CSVs: one for your detailed data, and the other for your ID-State table.</p>
<p> </p>
<p>Then, create a New Joint Data Set that would join the detailed data with your lookup table.</p>
<p> </p>
<p>Next, create a chart report element as a Pie Chart. Under the Select Data tab, for Category Definition, choose the "State" column. For Slice Size Definition, choose the "Date Event" column. You'll need to change the Function to "Count".</p>
Steven Jung
<p>Thank you, I try this but im not the best in Birt
</p>
<p>Is it possible to do this in a other way?</p>
<p>Because I have to handle few other thinks in my report and I dont know how many it influence my other tables.</p>
<p> </p>
<p> </p>
<p>Have a nice day.</p>
<p> </p>
<p>Steven</p>
Clement Wong
<p>Having a Joint Data Set would be independent of your other report items.</p>
<p> </p>
<p>And if you're data source is not CSV, and is from a relational database, you can do your joins in the database instead.</p>