Skip to content

Instantly share code, notes, and snippets.

@Divya1425
Last active September 28, 2017 09:42
Show Gist options
  • Save Divya1425/23cdab7d136a928dca591cb7d0631704 to your computer and use it in GitHub Desktop.
Save Divya1425/23cdab7d136a928dca591cb7d0631704 to your computer and use it in GitHub Desktop.
layout title description platform control documentation
post
Range Band
How to highlight particualr region in Essential Xamarin.Forms Sparkline
xamarin
Sparkline
ug

Range Band

This feature is used to highlight a particular region in the sparkline along Y axis.

  • RangeBandStart - used to configure the start range band value in Y axis.
  • RangeBandEnd - used to configure the end range band values in Y axis.
  • RangeBandColor - used to change the color for range band.

{% tabs %}

{% highlight xaml %}

<sparkline:SfLineSparkline ItemsSource="{Binding Data}" YBindingPath="Performance" RangeBandStart="4000" RangeBandEnd="1000" RangeBandColor="Green"> </sparkline:SfLineSparkline>

{% endhighlight %}

{% highlight c# %}

SfLineSparkline lineSparkline = new SfLineSparkline() { YBindingPath = "Performance", ItemsSource = viewModel.Data, RangeBandStart = 4000, RangeBandEnd = 1000, RangeBandColor = Color.FromRgba(0, 255, 0, 100) };

{% endhighlight %}

{% endtabs %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment