# Data Binding

## Content



Data forms the core for any data visualization control. The Sparkline control can easily bind to any enumerable collection of data values i.e. to any class that implements the **IEnumerable** interface or the **INotifyCollectionChanged** interface to support data modification after binding.

You can populate the sparkline using the <span data-popup-content="This property is available in \u003ca href=\u0022/componentone/api/wpf/online-sparkline/dotnet-api/C1.WPF.Sparkline/C1.WPF.Sparkline.C1Sparkline.Data.html\u0022\u003e.NET\u003c/a\u003e and \u003ca href=\u0022/componentone/api/wpf/online-sparkline/dotnet-api/C1.WPF.Sparkline/C1.WPF.Sparkline.C1Sparkline.Data.html\u0022\u003e.NET Framework\u003c/a\u003e." data-popup-title="Data" data-popup-theme="ui-tooltip-green qtip-green">Data</span> property.

```csharp
sparkline.Data = new List<double> { 5, 6, 2, 12 };
```

Additionally, Sparkline supports a date axis which can be bound to a collection of dates that acts as x-coordinates using the <span data-popup-content="This property is available in \u003ca href=\u0022/componentone/api/wpf/online-sparkline/dotnet-api/C1.WPF.Sparkline/C1.WPF.Sparkline.C1Sparkline.DateAxisData.html\u0022\u003e.NET\u003c/a\u003e and \u003ca href=\u0022/componentone/api/wpf/online-sparkline/dotnet-api/C1.WPF.Sparkline/C1.WPF.Sparkline.C1Sparkline.DateAxisData.html\u0022\u003e.NET Framework\u003c/a\u003e." data-popup-title="DateAxisData" data-popup-theme="ui-tooltip-green qtip-green">DateAxisData</span> property.

```csharp
sparkline.DateAxisData = new List<DateTime> { new DateTime(2022, 1, 1), new DateTime(2022, 1, 2), new DateTime(2022, 1, 3) };
```

For a complete sample on how to bind Sparkline to a data source, see [Bind to Data Source](/componentone/docs/wpf/online-sparkline/quick_start#Bind_DataSource) section in the Quick Start topic.