ComponentOne Sparkline for UWP
Data and Data Binding
Sparkline for UWP Concepts and Main Properties > Data and Data Binding

There are two properties that control the data used in the C1Sparkline control: Data and DateAxisData. These properties are described in the table below:



Code Sample


Provides C1Sparkline's values. 

C1Sparkline.Data = new List<double>(){1,2,3,4,-1,-3,-4.5,6}


Provides the values for C1Sparkline's DateTime Axis.

C1Sparkline.DateAxisData =  new List<DateTime>(){ new DateTime(2013,11,1), new DateTime(2013,11,2)}

The steps required to create data bound charts are as follows:

  1. Choose the sparkline type (SparklineType property).
  2. Set the Binding property to the collection of items that contain the desired sparkline data. This can be seen in the Sparkline for UWP Quick Start.
  3. Adjust the chart's appearance using the Appearance properties.
See Also