How can I help you?
Appearance in JavaScript Sparkline control
The appearance of the sparkline can be customized using margin, containerArea border, and containerArea background.
Sparkline border
The containerArea border of the sparkline is used to render border to cover sparkline area.
The following code example shows the sparkline with overall border.
Sparkline padding
Padding is used to specify padding value between container and sparkline. By default, padding value of the sparkline is 5. Sparkline padding values are specified by the left, right, top, and bottom.
The following code example shows the sparkline with overall padding is set to 20.
Sparkline area customization
The background color of the sparkline area can be customized using the containerArea background color. By default, the sparkline background color is transparent.
Sparkline theme
Datalabel and trackline colors of the sparkline will be changed based on theme. For example, for dark theme, the color of datalabel and trackline should be white; for light theme, their value should be black. The possible values for sparkline theme are Material, Fabric, Bootstrap, and Highcontrast.
The following code example shows the color for datalabel and trackline is set to white for dark theme.