I am trying to put dynamic vertical marker line on a line chart with a non-category date/time x-Axis. I have read that it was a problem at one time but it was fixed.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=161579https://bugs.eclipse.org/bugs/show_bug.cgi?id=116004
I figure this code should work but it does not produce a maker line at the desired location. Ideas?
importPackage(Packages.org.eclipse.birt.chart.model.data.impl);
importPackage(Packages.org.eclipse.birt.core.script);
importPackage( Packages.org.eclipse.birt.chart.model.component.impl );
importPackage( Packages.org.eclipse.birt.chart.util );
function beforeGeneration(gcs, icsc)
{
var date1 = new cdatetime(2009,2,2);
var chart = icsc.getChartInstance();
var xaxis = chart.getPrimaryBaseAxes()[0];
var new_ml = markerlineimpl.create(xaxis, DateTimeDataElementImpl.create(date1));
new_ml.setLabelAnchor(Anchor.NORTH_WEST_LITERAL);
xaxis.getMarkerLines().add(new_ml);
}