Select theme:

Sparkline (Angular)Link to this section

This guide demonstrates how to use the Sparkline component.

SparklineLink to this section

NameTypeDefaultDescription
Namestring'sparkline' + index suffixUnique name of the Sparkline.
DataarraynullSparkline data.
ColorstringnullSparkline color.
ValuePropertystringnullSparkline data value property.

ConfigurationLink to this section

Simple configurationLink to this section

The only required property of the Sparkline component is Data. It specifies the values that the Sparkline displays. In the simplest configuration the Data is an array of numbers. Here is a quick example:

  1. Create a property and set its value. Use an array of some numbers: [1,5,3,5,3,2]. image
  2. Drag and drop a Sparkline component.
  3. Set its Data to the newly created property. image

That's it! The Sparkline will look like this.

image

Data-binding the SparklineLink to this section

Often you would need to data-bind the Sparkline to data coming from a Radzen data-source (database or REST API).

  1. Invoke the data-source method and set a property with the result. image
  2. Set the Data property of the Sparkline to the result.
  3. Set ValueProperty to the name of the property which represents the Sparkline data. image
© 2016-2026 Radzen Ltd. All Rights Reserved.
Designed and developed with ❤️ in Radzen Blazor Studio.
IP Geolocation by DB-IP

Select theme: