| Summary: | Tooltip error when the series dataset is modified | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Richard Gong <gongcon> | ||||
| Component: | BIRT | Assignee: | Xingsheng Zhu <xzhu> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Xiaoying Gu <bluesoldier> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bluesoldier | ||||
| Version: | 2.5.2 | ||||||
| Target Milestone: | 2.6.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Richard Gong
Hi Richard, Would you please attach the report design for us to reproduce this issue? Created attachment 176808 [details]
Add data to chart
Per Xiaoying's request
This is caused by the script. For charts contain tooltips, if we need to modify the series' runtime data set, we should also modify user data set for tooltips accordingly. Or it will cause this exception when setting data on datapointhints from user data set. Following is the script which can work after modified.
function afterDataSetFilled( series, dataSet, icsc )
{
importPackage( Packages.java.util );
importPackage( Packages.org.eclipse.birt.chart.model.type.impl );
var it = series.getDataSets().values().iterator();
while(it.hasNext())
{
var ds = it.next();
var list = ds.getValues();
var narray1 = new ArrayList( );
if( series.getClass() == BarSeriesImpl ){
//narray1.add(null);
narray1.add(20);
}else{
narray1.add("testbefore");
}
var ll =list.length;
for ( i=0; i<ll; i=i+1)
{
narray1.add(list[i]);
}
if( series.getClass() == BarSeriesImpl ){
narray1.add(20);
}else{
narray1.add("testafter");
}
ds.setValues(narray1);
}
}
Fix the issue to avoid the exception, but user's script still need to be updated or the tooltips will not match the data points.
|