change color of labels in circular gauge
Posted: Wed Sep 07, 2016 1:27 pm
Hi,
I'm creating a circular gauge in Xamarin forms, and I'm trying to change the label's color. I tried setting every property I could find, but it won't change... Can anyone help me?
this is my code: (just setting the property of the axis labels color here, because that's the one I think needs to be set... I also tried it with many other properties I found, but none are working).
In attachment the screenshot of my gauge, I want to change the color of the numbers on the axis
Thanks!
I'm creating a circular gauge in Xamarin forms, and I'm trying to change the label's color. I tried setting every property I could find, but it won't change... Can anyone help me?
this is my code: (just setting the property of the axis labels color here, because that's the one I think needs to be set... I also tried it with many other properties I found, but none are working).
Code: Select all
Chart CreateView ()
{
var c = new Chart (this);
c.Header.Visible = false;
c.Panel.Visible = false;
var gauge = new CustomChart (c.Chart);
gauge.Frame.Visible = false;
gauge.FaceBrush.Visible = false;
gauge.DisplayTotalAngle = 180;
gauge.TotalAngle = 180;
gauge.Value = GetCurrentValue ();
gauge.Ticks.Visible = false;
gauge.Minimum = 0;
gauge.Maximum = GetMonths ();
gauge.Axis.Increment = GetMonths () / 4;
gauge.RedLine.Visible = false;
gauge.GreenLineStartValue = 0;
gauge.GreenLineEndValue = GetMonths ();
gauge.GreenLine.Gradient.Direction = Steema.TeeChart.Drawing.GradientDirection.LeftRight;
gauge.GreenLine.Gradient.StartColor = Color.FromRgb (6, 64, 137);
gauge.GreenLine.Gradient.EndColor = Color.FromHex ("#159DFB");
gauge.GreenLine.Pen.Visible = true;
gauge.Axis.Labels.Color = Color.Red;
return c;
}
Thanks!