|
Text on addzone |
Posted by Kevin on Mar-05-2016 03:12 |
|
In my polar chart I am going to need to put text on each Red, Yellow and Green zone. Is it possible to add text in the Pol.angularAxis().addZone(1, 2, 0, 40, &HFF0202, &H0) statement. Right now the only way I found to put the text on is doing this.
Dim polTxt As TextBox = Pol.addText(335, 260, "1 of 7", "arialbd.ttf", 12)
polTxt.setFontAngle(38)
polTxt = Pol.addText(315, 240, "49%", "arialbd.ttf", 12)
polTxt.setFontAngle(38)
Thanks,
Kevin
|
Re: Text on addzone |
Posted by Peter Kwan on Mar-05-2016 16:47 |
|
Hi Kevin,
For your case, you would need to use the addText method. You may use something like:
... create the chart as usual and add the zones ...
// auto-scale the axis so that we can use getXCoor and getYCoor
c.layout();
c.addText(c.getXCoor(1.5, 20), c.getYCoor(1.5, 20), "ABCD", "arialbd.ttf", 8, 0x000000, Chart.Center, -20)
The above assumes the zone is with radius = 1 to 2 and angle = 0 to 40, so that the center point is radius = 1.5 and angle = 20. The text is rotated by the same angle (the minus sign is because the text is rotated counterclockwise, while I assume the angles in the polar chart is configured to be clockwise).
Hope this can help.
Regards
Peter Kwan |
Re: Text on addzone |
Posted by Kevin on Mar-08-2016 00:28 |
|
Peter,
Thanks, this worked except radius = 0 to 40 and angle = 1 to 2 so I had to flip the getXCoor number.
c.addText(c.getXCoor(20, 1.5), c.getYCoor( 20,1.5), "ABCD", "arialbd.ttf", 8, 0x000000, Chart.Center, -20)
Thanks,
Kevin |
|