1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| /**
* Called before generation of chart model to GeneratedChartState.
*
* @param chart
* Chart
* @param icsc
* IChartScriptContext
*/
function beforeGeneration( chart, icsc )
{
importPackage(Packages.org.eclipse.birt.chart.model.component.impl);
importPackage(Packages.org.eclipse.birt.chart.model.data.impl);
importPackage(Packages.org.eclipse.birt.chart.model.attribute);
importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);
var xAxis = chart.getAxes().get(0);
//var yAxis = xAxis.getAssociatedAxes().get(0);
var today = new Date ("05/01/2005");
today_ml = MarkerLineImpl.create(xAxis, NumberDataElementImpl.create(today));
today_ml.getLabel().getCaption().setValue(today);
} |
Partager