Hi,
The problem is that you add your marking to the wrong Markings. When the plot is really created by flot (when placeholder added to the DOM), the options are duplicated and you have to modify this duplicate.
The reference to the Markings object you are keeping isn't used by flot.
To get the correct options, you have to retrieve them with plot.getPlotOptions() after the plot have been created. So you can initialize the Markings option and then in your click listener do :
plot1.getPlotOptions().getGridOptions().getMarkings().addMarking(m);
You can also initialize your markingsArray with the above code and keep your current click listener :
plot1.addLoadHandler( new PlotLoadEvent.Handler() {
@Override
public void onLoad( PlotLoadEvent event )
{
markingsArray = plot1.getPlotOptions().getGridOptions().getMarkings();
}
} );