You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Step 2:** Create a value to visibility converter to control the visibility of the data label based on the Y-value. For example, in the following converter, we have collapsed the visibility of the data label for values less than 50.
20
20
@@ -24,10 +24,9 @@ This article will explain the step to hide or collapse specific data labels in a
24
24
{
25
25
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
26
26
{
27
-
if (!(value is double))
27
+
if (!(value is double labelValue))
28
28
return null;
29
29
30
-
var labelValue = (double)value;
31
30
if (labelValue < 50)
32
31
return false;
33
32
return true;
@@ -46,15 +45,12 @@ This article will explain the step to hide or collapse specific data labels in a
**Step 4:** Set the defined DataTemplate to the [LabelTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartSeries.html#Syncfusion_Maui_Charts_ChartSeries_LabelTemplate) property of [ColumnSeries](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ColumnSeries.html).
@@ -64,7 +60,7 @@ This article will explain the step to hide or collapse specific data labels in a
0 commit comments