I am working on an application which sometimes requires moving the chart widget from one parent to another. This required calling the BaseChart.setPersistent() method in order to have my series data retained across the transfer. However, I noticed that my chart titles are sometimes not retained.
I believe that this behaviour occurs because of the way the BaseChart.setTitle() method is written. Basically, the nativeSetTitle() method is called in lieu the standard java option setting methods whenever the chart is already rendered. This causes changes to the title made while the chart is rendered to not persist when removing and re-adding the chart widget. A simple fix would be to just remove the else clause around the calls to setChartTitle() and setChartSubtitle(). (Alternately, one could make these calls only if BaseChart.isPersistent() returns true.)
In the meantime, I am using extra external calls to setChartTitle() and setChartSubtitle() as a workaround.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am working on an application which sometimes requires moving the chart widget from one parent to another. This required calling the BaseChart.setPersistent() method in order to have my series data retained across the transfer. However, I noticed that my chart titles are sometimes not retained.
I believe that this behaviour occurs because of the way the BaseChart.setTitle() method is written. Basically, the nativeSetTitle() method is called in lieu the standard java option setting methods whenever the chart is already rendered. This causes changes to the title made while the chart is rendered to not persist when removing and re-adding the chart widget. A simple fix would be to just remove the else clause around the calls to setChartTitle() and setChartSubtitle(). (Alternately, one could make these calls only if BaseChart.isPersistent() returns true.)
In the meantime, I am using extra external calls to setChartTitle() and setChartSubtitle() as a workaround.
FYI - This issue should now be resolved with the 1.7.0 release.