New to Telerik UI for WPFStart a free 30-day trial

Set MinXValue and MaxXValue When DateTime Values are Used in RadSparkline

Updated on Sep 15, 2025

Environment

Product Version2019.3.917
ProductRadSparkline for WPF

Description

How to set the minimum (MinXValue) and maximum (MaxXValue) when DateTime values are plotted on the horizonal axis.

Solution

To define the range manually, set the AutoRange property of RadSparkline to False. Then set the MinXValue and MaxXValue properties. To make this work with DateTime values, you will need to use the Ticks of the DateTime objects used as minimum and maximum of the range.

C#
	this.radSparkline.AutoRange = false;
	this.radSparkline.MinXValue = minDateTime.Ticks;
	this.radSparkline.MaxXValue = maxDateTime.Ticks;
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support