RFR: 8283675: Line not removed from LineChart when series cleared

Andy Goryachev angorya at openjdk.org
Mon Aug 21 18:45:36 UTC 2023


On Fri, 18 Aug 2023 07:25:28 GMT, Karthik P K <kpk at openjdk.org> wrote:

> The issue is present in AreaChart along with the LineChart. Issue is fixed in both the charts as part of this PR.
> The line elements in case of Line chart and both line element and fill element in the case of Area charts were not cleared in `makePaths()` method in AreaChart.java. Hence the line and fill area were not getting cleared when series was cleared.
> 
> Made changes in code to clear line element and fill element as required in the `makePaths()` method.
> 
> Added tests to validate the changes in both LineChart and AreaChart.

While testing, I noticed another issue (an existing one, since it also appears with the master branch):

when clearing/adding/removing points (use the latest version of the Monkey Tester https://github.com/andy-goryachev-oracle/MonkeyTest), the minor ticks are not always getting updated, resulting in the vertical axis rendered incorrectly:

<img width="1097" alt="Screenshot 2023-08-21 at 11 30 37" src="https://github.com/openjdk/jfx/assets/107069028/168d6c8c-dec9-4fae-a232-50ae319b972b">

this issue can be seen with any kind of XYChart (area, bar, bubble, line, scatter, stacked area, stacked bar).

@karthikpandelu would you please check if we already have a similar issue and create one if not?

modules/javafx.controls/src/test/java/test/javafx/scene/chart/AreaChartTest.java line 502:

> 500: 
> 501:     //JDK-8283675
> 502:     @Test public void testChartFillRemovedOnClearingSeries() {

should we add a similar test for other chart types (even if those do not have the issue)?

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1214#issuecomment-1686844299
PR Review Comment: https://git.openjdk.org/jfx/pull/1214#discussion_r1300510156


More information about the openjfx-dev mailing list