Shawn Quinn - 2012-02-11

Good find, and thanks for posting what you've figured out! Yeah, running that direct DOM logic (via JSNI) against the elements that Highcharts creates seems like a reasonable way to make this work until Highcharts adds more explicit support for dynamically controlling the position of labels. As you noted, you will want to sure you run that kind of logic after the chart has been rendered. One way to do this would be to extend the Chart class and override the "onLoad()" method. Another way might be use the GWT attach handler. E.g.

Chart chart = new Chart();
chart.addSeries(chart.createSeries()
    .setPoints(new Number[]{163, 203, 276, 408, 547, 729, 628})
);
chart.addAttachHandler(new AttachEvent.Handler() {
    public void onAttachOrDetach(AttachEvent event) {
        // Manipulate rendered elements here...
    }
});

I haven't tried either of those myself though, so keep us posted on what you find...