Back from vacation and resuming work on my project referenced in https://www.b4x.com/android/forum/threads/get-list-of-b4xpath-points.103545/ . I need to label each pie segment (inside the chart, not in a separate key label or external label with line pointing to the segment), and I was going to use @Erel's drawTextOnPath example, however since I'm using a B4XCanvas object instead of a plain Canvas object, I get an error due to no "paint" field in the B4XCanvas object:
I'm looking to place text at the outer path of each segment, for example "Label 1", "Label 2", "Label 3":
Is there any other way to accomplish this with a B4XCanvas object or should I scrap cross-platform and just go with the standard Canvas object in order to use the drawTextOnPath method?
B4X:
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 448 (PieChart)
java.lang.NoSuchFieldException: No field paint in class Lanywheresoftware/b4a/objects/B4XCanvas; (declaration of 'anywheresoftware.b4a.objects.B4XCanvas' appears in /data/app/phx.test-2/base.apk)
at java.lang.Class.getDeclaredField(Native Method) …<snip>
Is there any other way to accomplish this with a B4XCanvas object or should I scrap cross-platform and just go with the standard Canvas object in order to use the drawTextOnPath method?