Xamarin Chart - Examples
Please note! These examples are new to SciChart Mobile v3 release! SciChart iOS & Android ship with Xamarin.iOS and Xamarin.Android bindings around our native iOS & Android Chart controls, allowing you to create fast & feature rich charts to your Xamarin applications. We include ~90 native iOS examples and 90 Android examples, but now also ~60 Xamarin Chart Examples to help you get started with SciChart. You can download the source for our Xamarin Chart Examples from Github, or browse the source code below.
This example demonstrates how to add Error Bars to an existing Xamarin Line or Xamarin Scatter Chart.
In SciChart there are two Error Bar Series types. In native Android these are:
- FastErrorBarsRenderableSeries which can render HlDataSeries or OhlcDataSeries
- FastFixedErrorBarsRenderableSeries which can be used to render an XyDataSeries (which contains one X-point and one Y-point), XyyDataSeries (renders Y values), XyzDataSeries, HlDataSeries and OhlcDataSeries(renders Close values).
In native iOS these are:
- The SCIFastErrorBarsRenderableSeries requires an SCIHlcDataSeries as data source. The High, Low values are used to set the high and low position of the errors, while the Close (Y-value) is the center of the error bar.
- The SCIFixedErrorBarsRenderableSeries. This requires only a SCIXyDataSeries with X,Y values.
Error values are fixed and specified by calling setErrorLow() and setErrorHigh() methods. The error can be either Relative or Absolute. You may adjust the width of the Error Bars, by adjusting how much space the bar takes up.
The C#/Xamarin.iOS/Xamarin.Android source code for the Xamarin Error Bars Chart example is included below (Scroll down!).
Did you know you can also view the source code from one of the following sources as well?
- Clone the SciChart.Xamarin.Examples from Github.
- Also, the SciChart for Xamarin Trial contains the full source code for the Xamarin chart examples (link below).