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)
Birt chart interaction to open detail of it
marcorossi
Hi and thanks for your time.<br />
<br />
I have to design a bar chart with Birt with a mininum of interaction on it.<br />
<br />
My dataset is the following:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>select id, score, hour from recording</pre>
<br />
and on chart i have defined:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Y serie: row["score"]
X serie: row["hour"]</pre>
<br />
followin example on internet I've found that is possible to add some script on mouse click on Value(Y) Series, and I've defined this kind of script:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>ShowEventData(evt, categoryData, valueData, valueSeriesName, legendItemText, legendItemValue, axisLabel);
</pre>
where ShowEventData is on an hidden field below chart (and alert correctly):<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<script language="JavaScript">
function ShowEventData(evt, categoryData, valueData, valueSeriesName, legendItemText, legendItemValue, axisLabel) {
alert( "categoryData=" + categoryData +" valueData=" + valueData +" valueSeriesName=" + valueSeriesName+" legendItemText="+legendItemText+" legendItemValue="+legendItemValue+" axisLabel="+axisLabel);
}
</script></pre>
<br />
Now, finally the problem: How can I show on alert id from dataset? And use it to move weebapp navigation using this id?<br />
<br />
Thanks!
Find more posts tagged with
Comments
mwilliams
So, when you click on a bar in the chart, you want to be able to have access to the "id" data from the dataSet that is not in the chart? If so, you could always store this value in a persistentGlobalVariable named by another field in the dataSet that is in the table, if possible, and access it from within the chart script that way. Not sure if this will work in your situation or not unless hour or score is unique.