ComponentOne Sparkline for WPF
Sparkline for WPF Overview / Features / Markers
In This Topic
    Markers
    In This Topic

    Sparkline control is primarily designed to depict trends and variation by plotting a set of data points. Depending on the Sparkline type, the data either gets displayed as a linear graph, winloss trend, or as columns without any chart-specific elements or customization. However, users might need to customize the way data points appear. For example, they may need to indicate or highlight the data points on a Sparkline. For this, Sparkline comes with markers whose visibility can be explicitly set to highlight various data points.

    The C1Sparkline class provides ShowMarkers property, which if set to true highlights all the data points. Here is how the Sparkline control looks with markers highlighting all the data points.

    Sparkline with Markers

    'Displaying Markers
    sparkline.ShowMarkers = True
    
    //Displaying Markers
    sparkline.ShowMarkers = true;
    

    The ShowMarkers property highlights all the data points in Sparkline. However, some users might want to highlight some specific values to suit their business needs. For this, the Sparkline control allows users to apply markers on specific data points as well. The following properties can be set in code for the same.

    Property Description Output
    ShowFirst You can set this property to true in code to highlight the first data point in the output as shown in the image alongside. By default, the marker highlights the first data point in maroon color. Sparkline showing first data point
    ShowLast You can set this property to true in code to highlight the last data point in the output as shown in the image alongside. By default, the marker highlights the last data point in green color. Sparkline showing last data point
    ShowHigh You can set this property to true in code to highlight the highest value in the output as shown in the image alongside. By default, the marker highlights the highest data point in red color. Sparkline showing highest data point
    ShowLow You can set this property to true in code to highlight the lowest value in the output as shown in the image alongside. By default, the marker highlights the lowest data point in blue color. Sparkline showing lowest data point
    ShowNegative You can set this property to true in code to highlight all the negative data points in the output as shown in the image alongside. By default, the marker highlights the negative data point(s) in red color.
    Note that markers can not be used to highlight data points in Column and WinLoss sparklines.