Page 1 of 1

Xamarin.iOS Legend Checkbox behaviour

Posted: Tue Sep 13, 2016 8:29 am
by 17879005
Hello,

I'm new to TeeChart programming. I'm creating an iOS app with TeeChart, wanted to display the legend checkboxes.
So I set:

Code: Select all

Chart.Legend.CheckBoxes = true;
I got the following legend display:
Image

My question is, is this really how the checkboxes look in iOS? My client is expecting something like in the desktop app: (There are actual checks inside and actual box)
Image

If this is really the iOS behaviour, then I must advise my client accordingly. However, if this is not how checkboxes are supposed to be displayed then I can anyone tell me what am I doing incorrectly.

Thanks!

Re: Xamarin.iOS Legend Checkbox behaviour

Posted: Tue Sep 13, 2016 12:09 pm
by Pep
Hello,

I'm sorry, TeeChart for Xamarin versions do not include the Legend CheckBoxes feature due to differences between each platform at the time to incorporate the CheckBox component to it.
This feature could be added as a wish for the next future releases. In meantime a workaround would be to do a custom legend by the user.

Re: Xamarin.iOS Legend Checkbox behaviour

Posted: Wed Sep 14, 2016 6:30 am
by 17879005
Hi Pep,

Thank you. Do you have any tutorial/documentation that may point me in the right direction on creating this custom legend?

Re: Xamarin.iOS Legend Checkbox behaviour

Posted: Wed Sep 14, 2016 9:40 am
by Pep
Hello,

ok,TeeChart for Xamarin.iOS allows custom drawing on canvas by using the onafterdraw event (draw shapes with colors, texts, etc..), but due to limitations for this specific platform I would suggest to create your own legend at the desired position (just below the Chart for example) by using a layout and add there all the shapes with text for the Series and the switches components if needed. You can then interact with the Chart Series and Legend (getting and setting its property values) easily.