Skip to content

Commit 60a24cb

Browse files
xristianstefanovTsvetomir-Hr
authored andcommitted
Update knowledge-base/chart-legend-colors-not-matching-stacked-bar-chart.md
Co-authored-by: Tsvetomir Hristov <[email protected]>
1 parent 612e96b commit 60a24cb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

knowledge-base/chart-legend-colors-not-matching-stacked-bar-chart.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Here is an example configuration that applies a specific color to each series in
3939
`````Razor
4040
<TelerikChart Width="100%" Height="100%">
4141
<ChartSeriesItems>
42-
@foreach (var series in _graphDataPoints)
42+
@foreach (var series in GraphDataPoints)
4343
{
4444
<ChartSeries Field="@nameof(GraphDataPoint.Value)"
4545
Type="ChartSeriesType.Bar"
@@ -54,14 +54,7 @@ Here is an example configuration that applies a specific color to each series in
5454
</TelerikChart>
5555
5656
@code {
57-
public class GraphDataPoint
58-
{
59-
public required string Color { get; set; }
60-
public required int Value { get; set; }
61-
public required string Label { get; set; }
62-
}
63-
64-
private List<GraphDataPoint> _graphDataPoints { get; set; } = [
57+
private List<GraphDataPoint> GraphDataPoints { get; set; } = [
6558
new GraphDataPoint
6659
{
6760
Label = "Early Settlement Candidate",
@@ -93,5 +86,12 @@ Here is an example configuration that applies a specific color to each series in
9386
Color = "#79C8AB"
9487
}
9588
];
89+
90+
public class GraphDataPoint
91+
{
92+
public required string Color { get; set; }
93+
public required int Value { get; set; }
94+
public required string Label { get; set; }
95+
}
9696
}
9797
`````

0 commit comments

Comments
 (0)