Skip to content

Commit 320f7eb

Browse files
author
KB Bot
committed
Added new kb article chart-kb-customize-separate-markers
1 parent bf2e7eb commit 320f7eb

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Configuring Individual Markers in a ScatterLine Chart
3+
description: Learn how to customize markers for specific data points in a ScatterLine chart to highlight them as special.
4+
type: how-to
5+
page_title: How to Customize Markers for Specific Data Points in ScatterLine Chart
6+
slug: chart-kb-customize-separate-markers
7+
tags: charts, blazor, scatterline, markers, customization
8+
res_type: kb
9+
ticketid: 1666618
10+
---
11+
12+
## Environment
13+
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>Charts for Blazor</td>
19+
</tr>
20+
</tbody>
21+
</table>
22+
23+
## Description
24+
25+
I need to configure a ScatterLine chart so I can control the marker used for each data point independently. I want to mark some points as "special".
26+
27+
This KB article also answers the following questions:
28+
- How to mark specific data points in a ScatterLine chart?
29+
- How to customize separate markers in a Blazor ScatterLine chart?
30+
- How to use different markers for special data points in a chart?
31+
32+
## Solution
33+
34+
The marker type is defined per series level, so it is not possible to set different markers for the different data points out of the box.
35+
36+
To achieve the desired result of marking specific data points as "special" in a ScatterLine chart, follow these steps:
37+
38+
1. Use a Chart type with lines for the first series and provide it with all available data points (for example, ScatterLine).
39+
40+
2. Use a Chart type without lines for the second series, so the lines do not mix (for example, Scatter).
41+
42+
3. In the second series data include only the points that you want to mark as special.
43+
44+
4. Increase the ZIndex of the second series to ensure its points are rendered on top of the first series.
45+
46+
5. Choose a different marker type for the second series from the options available in the `ChartSeriesMarkersType` enum. Once available, you may consider using the visual template to completely customize the markers.
47+
48+
5. Optionally, set a different color for the second series to distinguish the "special" points further.
49+
50+
A basic example demonstrating this approach can be found [here](https://blazorrepl.telerik.com/wnkIcYuh2054iX5041).
51+
52+
## See Also
53+
54+
- [ScatterLine Chart Overview](https://docs.telerik.com/blazor-ui/components/chart/types/scatterline)
55+
- [ChartSeriesMarkersType Enum](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.ChartSeriesMarkersType)
56+
- [Custom Rendering for the Chart Series Markers - Visual Template](https://feedback.telerik.com/blazor/1582456-custom-rendering-for-the-chart-series-markers-visual-template)
57+
- [ChartSeries ZIndex Property](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.Components.ChartSeries#collapsible-Telerik_Blazor_Components_ChartSeries_ZIndex)

0 commit comments

Comments
 (0)