4

I'm using the com.codename1.charts lib but there isn't a whole lot of documentation. None of the chart demos use dashed or dotted lines and I assumed you could use BasicStroke.DASHED but changing this constant value does not seem to make a difference and keeps the line solid.

I'm using the following code:

colors.add(ColorUtil.GRAY);
styles.add(PointStyle.POINT);
strokes.add(BasicStroke.DASHED);
lineWeight.add(3);
XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles, strokes, lineWeight);
Nick
  • 41
  • 1

1 Answers1

0

There doesn't seem to be support for that. The charts were ported from Android and use a compatibility layer. That stroke class is an Android compatibility class that includes some functionality we don't support yet specifically intervals for a stroke.

You can file an issue to enhance that, basically the BasicStroke includes an mIntervals variable that isn't matched in Stroke. The fix is obviously harder as the draw method in Graphics would need to account for that too and that would mean implementing that in all the native platform ports.

I'm not sure if there is a simple workaround for this.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65