layout | title | description | platform | control | documentation |
---|---|---|---|---|---|
post |
Sparkline Axis |
How to customize Axis in Essential Xamarin.Forms Sparkline |
xamarin |
Sparkline |
ug |
Axis of the sparkline can be configured and customized using following properties. This feature is applicable for all the sparkline types except SfWinLossSparkline
.
IsVisible
- used to change the visibility of the axis.StrokeColor
- used to change the color of the axis.StrokeWidth
- used to change the width of the axis.AxisOrigin
- used to change the origin (positive or negative) of the axis.
{% tabs %}
{% highlight xaml %}
<sparkline:SfLineSparkline ItemsSource="{Binding Data}"
YBindingPath="Performance">
sparkline:SfLineSparkline.Axis
<sparkline:SparklineAxis IsVisible="true"
StrokeColor="Red"/>
</sparkline:SfLineSparkline.Axis> </sparkline:SfLineSparkline>
{% endhighlight %}
{% highlight c# %}
SfLineSparkline lineSparkline = new SfLineSparkline() { YBindingPath = "Performance", ItemsSource = viewModel.Data, Axis = new SparklineAxis() { IsVisible = true, StrokeColor = Color.Red, } };
{% endhighlight %}
{% endtabs %}