Menu

Possible bug with persistence of chart title

Dan Denton
2015-03-03
2015-06-23
  • Dan Denton

    Dan Denton - 2015-03-03

    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.

     
  • Shawn Quinn

    Shawn Quinn - 2015-06-23

    FYI - This issue should now be resolved with the 1.7.0 release.

     

Log in to post a comment.