Skip to content

Commit 532f52f

Browse files
shai-almogclaude
andcommitted
DIAGNOSTIC: empty dataset in chart-line to isolate drawSeries
Previous diagnostic with showLabels/Legend/Grid/Axes off still produced a byte-identical blank PNG on iOS GL+Metal -- so the only remaining significant chart paint was drawSeries -> drawPath. Drop all data series so drawSeries is never invoked. If chart-line *now* captures a non-blank form (just an empty chart area + form title bar) the iOS blank-render is on the drawPath / Graphics.drawShape / TextureAlphaMask path. If it stays byte-identical blank, the bug is upstream of any actual chart drawing -- something about ChartComponent.paint or XYChart.draw's pre-series setup is corrupting the iOS form-Graphics state. Pure diagnostic; reverts after the culprit is identified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0e28a3d commit 532f52f

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/charts/ChartLineScreenshotTest.java

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,13 @@ public class ChartLineScreenshotTest extends AbstractChartScreenshotTest {
1818

1919
@Override
2020
protected AbstractChart buildChart() {
21+
// Diagnostic: empty dataset so drawSeries is never invoked. If
22+
// chart-line still produces a blank PNG with no series + everything
23+
// else off, the bug is in XYChart.draw's pre-series setup or in the
24+
// form / paint pipeline interaction with ChartComponent. If chart-line
25+
// *now* renders an empty (but non-blank) form, drawSeries' drawPath
26+
// is the iOS-specific culprit.
2127
XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
22-
XYSeries north = new XYSeries("North");
23-
north.add(2018, 12);
24-
north.add(2019, 16);
25-
north.add(2020, 22);
26-
north.add(2021, 18);
27-
north.add(2022, 28);
28-
dataset.addSeries(north);
29-
30-
XYSeries south = new XYSeries("South");
31-
south.add(2018, 8);
32-
south.add(2019, 11);
33-
south.add(2020, 13);
34-
south.add(2021, 16);
35-
south.add(2022, 19);
36-
dataset.addSeries(south);
3728

3829
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
3930
renderer.setLabelsTextSize(20);
@@ -56,7 +47,7 @@ protected AbstractChart buildChart() {
5647
// renderer.setYTitle("Value");
5748
renderer.setXLabels(5);
5849
renderer.setYLabels(5);
59-
renderer.setShowGrid(true);
50+
// renderer.setShowGrid(true); // diagnostic: keep grid off
6051

6152
XYSeriesRenderer northRenderer = new XYSeriesRenderer();
6253
northRenderer.setColor(ColorUtil.rgb(0x0a, 0x66, 0xff));

0 commit comments

Comments
 (0)