Sparkline for WPF
マーカー

Markers are symbols that are used to highlight or emphasize certain data points. With markers, the sparkline becomes more readable and it becomes easier to distinguish between specific data points, such as high or low values.

Markers are supported only in the line sparkline. In a line sparkline, markers are represented by dot symbols which can be used to analyze the data. You can highlight all the data points in a line sparkline by setting ShowMarkers property of the C1Sparkline class to true.

WPF Sparkline with markers

The following code shows how you can set the ShowMarkers property.

<c1:C1Sparkline x:Name="sparkline" ShowMarkers="True" Height="250" Width="250"/>
sparkline.ShowMarkers = true;

ビジネスニーズによっては、特定の値を強調表示したい場合があります。そのために、Sparkline コントロールでは、特定のデータポイントにもマーカーを適用できます。次のプロパティを同様にコードで設定できます。

プロパティ 説明 出力
ShowFirst このプロパティをコード内で true に設定して、右の画像のように、出力の最初のデータポイントを強調表示できます。デフォルトでは、最初のデータポイントがえび茶色のマーカーで強調表示されます。 Displays Sparkline after highlighting the first data point.
ShowLast このプロパティをコード内で true に設定して、右の画像のように、出力の最後のデータポイントを強調表示できます。デフォルトでは、最後のデータポイントが緑色のマーカーで強調表示されます。 Displays Sparkline after highlighting the last data point.
ShowHigh このプロパティをコード内で true に設定して、右の画像のように、出力の最大のデータポイントを強調表示できます。デフォルトでは、最大のデータポイントが赤色のマーカーで強調表示されます。 Displays Sparkline after highlighting the highest data point.
ShowLow このプロパティをコード内で true に設定して、右の画像のように、出力の最小のデータポイントを強調表示できます。デフォルトでは、最小のデータポイントが青色のマーカーで強調表示されます。 Displays Sparkline after highlighting the lowest data point.
ShowNegative このプロパティをコード内で true に設定して、右の画像のように、出力のすべての負のデータポイントを強調表示できます。デフォルトでは、負のデータポイントが赤色のマーカーで強調表示されます。 Displays Sparkline after highlighting negative data points.

As mentioned above, various data points are rendered in their specific default color. However, Sparkline allows you to modify this default behavior and highlight data points in a color of your choice, making Sparkline more customizable for users from appearance perspective. For more information on how to change the style of data points, see Styling Markers.