final WebMarkupContainer info2c = new WebMarkupContainer("info2c");
info2c.setOutputMarkupId(true);
add(info2c);
chart2b.add(new WiQueryEventBehavior(new Event(JQPlotEvent.DATA_HIGHLIGHT)
{
private static final long serialVersionUID = 1L;
@Override
public JsScope callback()
{
return new JsScope("ev", "seriesIndex", "pointIndex", "data")
{
private static final long serialVersionUID = 1L;
@Override
protected void execute(JsScopeContext scopeContext)
{
StringBuilder body = new StringBuilder();
body.append("$('#");
body.append(info2b.getMarkupId());
body.append("').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data+ ', pageX: '+ev.pageX+', pageY: '+ev.pageY);");
scopeContext.append(body);
}
};
}
}));
chart2b.add(new WiQueryEventBehavior(new Event(JQPlotEvent.DATA_CLICK)
{
private static final long serialVersionUID = 1L;
@Override
public JsScope callback()
{
return new JsScope("ev", "seriesIndex", "pointIndex", "data")
{
private static final long serialVersionUID = 1L;
@Override
protected void execute(JsScopeContext scopeContext)
{
StringBuilder body = new StringBuilder();
body.append("$('#");
body.append(info2c.getMarkupId());
body.append("').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data+ ', pageX: '+ev.pageX+', pageY: '+ev.pageY);");
scopeContext.append(body);
}
};
}
}));
chart2b.add(new WiQueryEventBehavior(new Event(JQPlotEvent.DATA_UNHIGHLIGHT)
{
private static final long serialVersionUID = 1L;
@Override
public JsScope callback()