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)
Dynamically adding a series to a Chart with data from a scripted array
areinersdorff
<p>Hi,</p>
<p> </p>
<p>I would like to add a new series to a chart with data from a scripted array.</p>
<p> </p>
<p> </p>
<p>I have a table that looks like this:</p>
<p> </p>
<p> </p>
<p>Column1 Column2 Column3 Sum</p>
<p>1 2 2 5</p>
<p>2 1 2 10 </p>
<p>0 4 6 20</p>
<p> </p>
<p> </p>
<p>In the Sum Column I calculate the sum of the values and add it up.</p>
<p>I do this in the OnCreate Event in the column cell and store the values in a persistent global variable.</p>
<p> </p>
<p>I display the columns in a bar chart and would like to display the sum column as a line.</p>
<p> </p>
<p>The values are stored in a PGV string, but I cannot get them in the beforeFactory Event, to add a line to my chart.</p>
<p>I guess my problem is the event order sequence. The PGV is created in OnCreate after the beforeFactory. Passing values by the onFetch Event of the dataset doesn't seem to work either.</p>
<p> </p>
<p>Any suggestions for how to do this would be very much appreciated!</p>
<p> </p>
<p>Thank you.</p>
Find more posts tagged with
Comments
GLO_FR
Hi,<br><br>what version of BIRT are you using ?<br>Why can't you store the sum result directly in your DS ?
areinersdorff
<p>Actuate BIRT Designer Professional<br>
Version: 4.2.3</p>
GLO_FR
Here is 2 examples.<br><br>* First chart<br>The sum as been made on the fetch event of the dataset, i.e. directly in the DS so that this new column can be used everwhere in the report.<br><br>* Second chart<br>The sum as been made in the table element and the table is used directly in the chart
areinersdorff
<p>I'm trying to find a way to do that.</p>
areinersdorff
<p>fantastic, thank you</p>
GLO_FR
You're welcome