Axis customization in JavaScript Sparkline control
18 Nov 20181 minute to read
You can customize axis value types and min and max values of the sparkline.
Change value type of the sparkline
You can change the sparkline value type by setting the [valueType] property to [Numeric], [Category], or [DateTime].
DateTime
You can assign date-time values to the sparkline by setting the [valueType] property to [DateTime].
Category
You can assign category values to the sparkline by setting [valueType] to [Category].
Numeric
You can assign numeric values to the sparkline by setting [valueType] to [Numeric].
Change min and max values of axis
You can change the min and max values of x-axis by setting the [minX] and [maxX] values to the [axisSettings] property. You can also change the min and max values of y-axis by setting the [minY] and [maxY] values to the [axisSettings] property.
Change value of axis
You can set horizontal axis line value of the sparkline by setting [value] to the [axisSettings] property. The following code example shows this.
Axis line customization
Axis of the sparkline can be collapsed using the [visible] property in [lineSettings]; this is not applicable for win-loss. You can customize the [color], [width], [opacity], and [dashArray] of axis line.