Summary: Support chart parameter
and data access in scripts
Bugzilla
Bug (s) Resolved: 137793
Description:
Implement a partial solution in 2.1.1Provide access to the chart data values
corresponding to the datapoint clicked on as script parameters.
1. Replace the function callback(evt, source) by the function callback(evt,
source, categoryData, valueData, valueSeriesName) in SVG.
2. Add function userCallback(
categoryData, valueData, valueSeriesName ) in <Script> tag and insert it
into <Map> tag.
How to use the chart
data in scripts?
Use the variables (categoryData,
valueData, valueSeriesName) directly in the scripts. Note it only takes effort
in “Value (Y) Series” interactivity.
E.g. categoryData is
"Text", script could be alert(categoryData);
valueData
is "Number", script could be alert(valueData * 5);
Tests Description:
Test Manually.
Files Edited:
/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/image/JavaImageIOWriter.java
/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGInteractiveRenderer.java
Files Added: None
Files Deleted: None
Notes to Build Team: None
Notes to
Developers: None
Notes to QA: None
Notes to Documentation: None
Regards,
Nina Li