Legend styling (Xamarin Forms)
Posted: Tue Feb 02, 2021 10:49 pm
Steema version = Steema.TeeChart.NET.Xamarin.Forms v4.2021.1.22
Xamarin Forms version = v5.0.0.1931
Development platform = Visual Studio 2019 Pro v16.7.7
Target device = Android 6.0 (API 23) to API 10.0 (API 29) smallest res = 480x800
I am trying to re-style the legend for a line chart but I cannot find the correct combination of properties to get the desired result. I have looked through the online documentation & tried various approaches but I am not getting anywhere.
I have written a small test solution (attached) to demonstrate what I am trying to achieve.
I would like the legend to have the following properties:
1) White text colour
2) Legend symbol to be square (as per Steema sample chart in image below), rather than a line. I have tried the following code to achieve this but it is not working...
3) Would like to increase the size of the legend text somehow?
4) Need to prevent the legend text from truncating (e.g. the letter g is cut-off at the bottom)
5) Also, I need to increase the gap between the axis labels & the axis line itself. Again, I have tried changing various properties but am not able to achieve this at the moment.
All feedback & assistance greatly appreciated
Xamarin Forms version = v5.0.0.1931
Development platform = Visual Studio 2019 Pro v16.7.7
Target device = Android 6.0 (API 23) to API 10.0 (API 29) smallest res = 480x800
I am trying to re-style the legend for a line chart but I cannot find the correct combination of properties to get the desired result. I have looked through the online documentation & tried various approaches but I am not getting anywhere.
I have written a small test solution (attached) to demonstrate what I am trying to achieve.
I would like the legend to have the following properties:
1) White text colour
2) Legend symbol to be square (as per Steema sample chart in image below), rather than a line. I have tried the following code to achieve this but it is not working...
Code: Select all
Chart.Legend.Symbol.Squared = true;
Chart.Legend.Symbol.Height = 10;
Chart.Legend.Symbol.Width = 10;
4) Need to prevent the legend text from truncating (e.g. the letter g is cut-off at the bottom)
5) Also, I need to increase the gap between the axis labels & the axis line itself. Again, I have tried changing various properties but am not able to achieve this at the moment.
All feedback & assistance greatly appreciated