Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamic addition and deletion of series on Y axis of line Chart
Spuri
I have a problem creating a dynamic chart in BIRT.
The problem statement is as follows:
I have multiple tables stored in sql and user can select any number of tables for comparison on single y axis and multiple series. X- axis is simply a time stamp. As there can be any number of tables selected so the dataset will be created dynamically and the number of lines(series) on a line chart will also be decided dynamically.
Please can you guide me how to accomplish the same.
i tried to generate the query dynamically using Java.
Please suggest if there is any other way to using joint statement as the data is huge and cause system to hang while using joint statement.
Regards
Find more posts tagged with
Comments
mwilliams
Will the selection of series' in the chart will be by a parameter?
Spuri
Hi,
Thanks for the reply.
Yes it will be based on the number of tables selected for comparison on a single chart and the name and number of tables selected can be passed via parameter.
I thought of passing the query generated in java as a parameter to be executed at runtime dynamically.
Please suggest alternate way if any.
Thanks again
mwilliams
Here's a devShare that shows how to dynamically drop a series:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1289-remove-chart-series-based-on-parameter/
Here's one that shows how to dynamically add a series:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/569-dynamically-add-a-series-to-a-chart/
So, as long as you can pass the series' you want to drop or show through a parameter, you can take either route.
Spuri
Hi,
Thanks a lot
It helped in providing me with one solution.
Here in my problem statement there is yet another issue.
In above solution, the data to be associated with the series was correlated with the data set row value as mentioned in the code but in my problem i have to get data from several sql databases based on user selection of number of tables he want to compare on y - axis. In that case there will be several dataset dynamically created.
So is there any way by which i can link this data set on single chart.
Regards
Saurabh
mwilliams
So, they come from different databases, so there's no way you can do it all in a single dynamic query? Is this the case?
Spuri
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="96686" data-time="1330147925" data-date="24 February 2012 - 10:32 PM"><p>
So, they come from different databases, so there's no way you can do it all in a single dynamic query? Is this the case?<br /></p></blockquote>
<br />
<br />
As the data is too large (each table with million lines and 14 columns) so if i use <strong class='bbc'>inner join statement</strong>, it takes lot of time to execute the query. But for report generation this large time wait is not a solution.<br />
<br />
Thus i want to execute separate dynamic queries for each series of a single chart.
Spuri
<blockquote class='ipsBlockquote' data-author="'frontstock'" data-cid="96700" data-time="1330181066" data-date="25 February 2012 - 07:44 AM"><p>
<strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/">tiffany</a></strong><strong><a'>http://www.mytiffanyandco.com/">tiffany</a></strong><strong><a</a>
; href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/">tiffany'>http://www.mytiffanyandco.com/">tiffany</a>
; and co</a></strong><strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/">tiffany'>http://www.mytiffanyandco.com/">tiffany</a>
; jewelry</a></strong><strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/">cheap'>http://www.mytiffanyandco.com/">cheap</a>
; tiffany jewelry</a></strong><br><strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/">tiffany'>http://www.mytiffanyandco.com/">tiffany</a>
; sale</a></strong><br><strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/accessories-tiffany-money-clips-c-5_11.html">discount'>http://www.mytiffanyandco.com/accessories-tiffany-money-clips-c-5_11.html">discount</a>
; tiffany money clips</a></strong><br><strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/tiffany-jewelry-tiffany-earrings-c-1_7.html">cheap'>http://www.mytiffanyandco.com/tiffany-jewelry-tiffany-earrings-c-1_7.html">cheap</a>
; tiffany earrings</a></strong><strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/tiffany-jewelry-tiffany-bangles-c-1_3.html">tiffany'>http://www.mytiffanyandco.com/tiffany-jewelry-tiffany-bangles-c-1_3.html">tiffany</a>
; bangles outlet</a></strong><strong><a href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/accessories-c-5.html">accessories</a></strong><strong><a'>http://www.mytiffanyandco.com/accessories-c-5.html">accessories</a></strong><strong><a</a>
; href="<a class='bbc_url' href='
http://www.mytiffanyandco.com/tiffany-jewelry-tiffany-alphabet-c-1_2.html">cheap'>http://www.mytiffanyandco.com/tiffany-jewelry-tiffany-alphabet-c-1_2.html">cheap</a>
; Tiffany alphabet</a></strong><br /></p></blockquote>
<br />
Hi,<br />
Please dont hijack this post by posting unnecessary advertisements...... <br />
Hope you understand.<br />
Please....<br />
<br />
Saurabh
suresh@anumolu
<p>Hi, links in the following comment are outdated. can you please update with the proper links on how to add/remove series dynamically?</p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Here's a devShare that shows how to dynamically drop a series: </span><a class="bbc_url" href="
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1289-remove-chart-series-based-on-parameter/"
; title="External link">
http://www.birt-exch...d-on-parameter/</a><span
style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> Here's one that shows how to dynamically add a series: </span><a class="bbc_url" href="
http://www.birt-exchange.org/org/devshare/designing-birt-reports/569-dynamically-add-a-series-to-a-chart/"
; title="External link">
http://www.birt-exch...ies-to-a-chart/</a><span
style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> So, as long as you can pass the series' you want to drop or show through a parameter, you can take either route. </span></p>
Clement Wong
<p>Updated links:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/401-remove-chart-series-based-on-parameter/'>http://developer.actuate.com/community/forum/index.php?/files/file/401-remove-chart-series-based-on-parameter/</a></p>
;
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/650-dynamically-add-a-series-to-a-chart/'>http://developer.actuate.com/community/forum/index.php?/files/file/650-dynamically-add-a-series-to-a-chart/</a></p>
;
<p> </p>
<p> </p>
<p>If you are using commercial BIRT (based on HighCharts), then you can add/remove using HighChart scripting.</p>