Skip to content

Commit 0e28a3d

Browse files
shai-almogclaude
andcommitted
DIAGNOSTIC: turn off labels/legend/grid/axes in chart-line
Trying to narrow down which XYChart.draw subpath is making chart-line render blank on iOS GL+Metal. With ShowLabels/ShowLegend/ShowGrid/ ShowAxes all disabled the chart paints only the data series strokes (drawPath through GeneralPath -> Graphics.drawShape). If chart-line then captures a non-blank PNG on iOS we know drawText/drawLegend/ drawGrid/drawAxes is at fault; if it stays blank, drawSeries' drawPath is the suspect. This commit is purely diagnostic and will be reverted once the culprit is identified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fcd5482 commit 0e28a3d

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,20 @@ protected AbstractChart buildChart() {
4040
renderer.setAxisTitleTextSize(20);
4141
renderer.setLegendTextSize(20);
4242
renderer.setMargins(new int[]{36, 60, 24, 24});
43-
renderer.setXTitle("Year");
44-
renderer.setYTitle("Value");
43+
// Diagnostic: turn off labels + legend + grid + axes so XYChart.draw
44+
// paints essentially nothing beyond drawSeries (the line strokes).
45+
// If chart-line renders an empty white form on iOS GL/Metal under
46+
// this minimal config we know the form / paint pipeline is working
47+
// and the bug is in one of the disabled code paths
48+
// (drawText / drawLegend / drawGrid / drawAxes). If it stays blank
49+
// even with everything off, something fundamental about XYChart's
50+
// first paint is breaking iOS rendering.
51+
renderer.setShowLabels(false);
52+
renderer.setShowLegend(false);
53+
renderer.setShowGrid(false);
54+
renderer.setShowAxes(false);
55+
// renderer.setXTitle("Year");
56+
// renderer.setYTitle("Value");
4557
renderer.setXLabels(5);
4658
renderer.setYLabels(5);
4759
renderer.setShowGrid(true);

0 commit comments

Comments
 (0)