Update Chart Title

How do i update the Chart Title after rendering.

configuration.getTitle().setText("New Title"); does nothing.

chart is a svg element, and I don’t think you can so simple change title after chart is rendering, you must probably read about push() method and implement some thread which do this and after ‘push’ the result must see in the browser.

The highchart API say to call chart.setTitle in json naturally.
But there is no method in the vaadin chart API except the one i posted above.

Hi, I’m afraid you’ll need to manually redraw the chart after title update at this point.

chart.drawChart(); Generally, I’d suggest to use Label (or an extension like Header in
Maddon
) instead of the title in the Chart. The advantage is that this way you have better control for it with e.g. css.

With AbsoluteLayout it is also possible to position labels or any other Vaadin Components on top of the chart. You’ll just need to know where you have empty space in your chart.

cheers,
matti