ComponentOne Sparkline for WPF
Sparkline for WPF Overview / Features / Markers / Customizing Marker Color
In This Topic
    Customizing Marker Color
    In This Topic

    Markers indicate or highlight various data points in a default color. For example, negative data points get highlighted in red color on setting ShowNegative property to true, while the last data point gets highlighted in green color when the ShowLast property is set to true. However, you can modify this default behavior and highlight data points in a color of your choice, making Sparkline more customizable for users from appearance perspective.

    The C1Sparkline class provides various properties to customize marker colors in code. For example, the MarkersColor property specifies the color of the markers for each data point.

    Here is how a Sparkline control appears after setting the MarkersColor property to Red.

    Markers highlighting data points in Red

    To highlight data markers in a different color programmatically, set the MarkersColor property in code.

    'Setting Marker Color
    sparkline.MarkersColor = Colors.Red
    
    //Setting Marker Color
    sparkline.MarkersColor = Colors.Red;
    

    Here is a list of properties that can be used to customize marker colors for highlighting specific data points.

    Property Description
    FirstMarkerColor This property can be set to specify the marker color for the first data point in Sparkline.
    LastMarkerColor This property can be set to specify the marker color for the last data point in Sparkline.
    HighMarkerColor This property can be set to specify the marker color for the highest data point in Sparkline.
    LowMarkerColor This property can be set to specify the marker color for the lowest data point in Sparkline.
    NegativeColor This property can be set to specify the marker color for negative data points in Sparkline.