How can I change the text color of a legend?
XAML
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="tryfsharpforms.CompareTwoStocksChartPage"
xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms" >
<ContentPage.Content>
<chart:SfChart x:Name="Chart">
<!-- Primary Axis-->
<chart:SfChart.PrimaryAxis>
<chart:CategoryAxis LabelRotationAngle="-45">
<chart:CategoryAxis.Title>
<chart:ChartAxisTitle Text="Date" TextColor="White" />
</chart:CategoryAxis.Title>
</chart:CategoryAxis>
</chart:SfChart.PrimaryAxis>
<!-- Secondary Axis-->
<chart:SfChart.SecondaryAxis>
<chart:NumericalAxis>
<chart:NumericalAxis.Title>
<chart:ChartAxisTitle Text="Price" TextColor="White" />
</chart:NumericalAxis.Title>
</chart:NumericalAxis>
</chart:SfChart.SecondaryAxis>
<!-- Line Graph-->
<chart:SfChart.Series>
<chart:LineSeries StrokeWidth="2" ItemsSource="{Binding StockData1}" XBindingPath="Date" YBindingPath="Close" x:Name="series1" />
<chart:LineSeries StrokeWidth="2" ItemsSource="{Binding StockData2}" XBindingPath="Date" YBindingPath="Close" x:Name="series2"/>
<!-- End Line Graph-->
</chart:SfChart.Series>
<chart:SfChart.Legend>
<chart:ChartLegend ToggleSeriesVisibility="true" />
</chart:SfChart.Legend>
</chart:SfChart>
</ContentPage.Content>
</ContentPage>
C#
public partial class CompareTwoStocksChartPage : ContentPage
{
public CompareTwoStocksChartPage (IEnumerable<Tuple<DateTime, decimal>> priceList1, IEnumerable<Tuple<DateTime, decimal>> priceList2, string ticker1, string ticker2)
{
InitializeComponent ();
Title = ticker1.ToUpper() + " vs " + ticker2.ToUpper();
BackgroundColor = MyColors.MidnightBlue;
series1.Color = MyColors.Turqoise;
series2.Color = MyColors.Carrot;
series1.Label = ticker1.ToUpper ();
series2.Label = ticker2.ToUpper ();
var svm = new StocksViewModel (priceList1, priceList2);
BindingContext = svm;
}
Screenshot. Pardon the size :-)