Class ChartDataEditSettings
Provides options to customize the drag settings for chart series.
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartDataEditSettings : ChartSubComponent, ISubcomponentTracker
Constructors
ChartDataEditSettings()
Declaration
public ChartDataEditSettings()
Properties
Enable
Gets or sets a value indicating whether to enable data editing by dragging the point.
Declaration
public bool Enable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if data editing is enabled; otherwise, false. The default value is false. |
Remarks
When set to true, users can interactively edit data points by dragging them on the chart.
Examples
// This example shows how to enable data editing in a chart by setting the ChartDataEditSettings.
<SfChart>
<ChartSeriesCollection>
<ChartSeries DataSource="@Data" Name="England" XName="XValue" YName="YValue">
<ChartDataEditSettings Enable="true"></ChartDataEditSettings>
<ChartMarker Visible="true" Width="10" Height="10" />
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
Fill
Gets or sets the color for the edited point.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color of the edited point. |
Remarks
The Fill property specifies the color of the point interior which will be assigned while dragging and will remain for the edited point.
This property accepts values in hex or rgba as a valid CSS color string.
Note: It is not applicable to line-based series types such as Line, Step Line, and Spline.
Examples
// This example demonstrates enabling data editing in a column chart and setting the fill color of edited points.
<SfChart>
<ChartSeriesCollection>
<ChartSeries DataSource="@Data" Name="England" XName="XValue" YName="YValue" Type="ChartSeriesType.Column">
<ChartDataEditSettings Enable="true" Fill="red"></ChartDataEditSettings>
<ChartMarker Visible="true" Width="10" Height="10" />
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
MaxY
Gets or sets the maximum Y value to which the point can be dragged for data editing.
Declaration
public double MaxY { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts double value. The default value is System.Double.NaN. |
Remarks
This property helps control the upper limit for the Y-axis when interactively editing data points on the chart.
Examples
// This example demonstrates how to enable data editing in a column chart
// and limit the maximum editable Y-value to 20 using MaxY property.
<SfChart>
<ChartSeriesCollection>
<ChartSeries DataSource="@Data" Name="England" XName="XValue" YName="YValue" Type="ChartSeriesType.Column">
<ChartDataEditSettings Enable="true" MaxY="20"></ChartDataEditSettings>
<ChartMarker Visible="true" Width="10" Height="10" />
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
MinY
Gets or sets the minimum Y value to which the point can be dragged for data editing.
Declaration
public double MinY { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts double value. The default value is System.Double.NaN. |
Remarks
This property helps control the lower limit for the Y-axis when interactively editing data points on the chart.
Examples
// This example demonstrates how to enable data editing in a column chart
// and restrict the minimum editable Y-value to 30 using the MinY property.
<SfChart>
<ChartSeriesCollection>
<ChartSeries DataSource="@Data" Name="England" XName="XValue" YName="YValue" Type="ChartSeriesType.Column">
<ChartDataEditSettings Enable="true" MinY="30"></ChartDataEditSettings>
<ChartMarker Visible="true" Width="10" Height="10" />
</ChartSeries>
</ChartSeriesCollection>
</SfChart>