Skip to main content

DxChartZoomAndPanSettings.AllowMouseWheel Property

Specifies whether users can use the mouse wheel to zoom the chart.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(true)]
[Parameter]
public bool AllowMouseWheel { get; set; }

Property Value

Type Default Description
Boolean true

true if a user can use the mouse wheel; otherwise, false.

Remarks

Users can use the mouse wheel to zoom the chart. To disable this feature, set the AllowMouseWheel property to false.

@using Chart.Data

<DxChart Data="@SalesData">
    <DxChartLineSeries Name="2017"
                       Filter="@((SaleInfo s) => s.Date.Year == 2017)"
                       ArgumentField="@(s => s.Date)"
                       ValueField="@(s => s.Amount)">
        <DxChartAggregationSettings Enabled="true" Method="ChartAggregationMethod.Sum" />
    </DxChartLineSeries>
    <DxChartZoomAndPanSettings ArgumentAxisZoomAndPanMode="ChartAxisZoomAndPanMode.Both"
                               ValueAxisZoomAndPanMode="ChartAxisZoomAndPanMode.Pan"
                               AllowMouseWheel="false"/>
    <DxChartScrollBarSettings ArgumentAxisScrollBarVisible="true"
                              ArgumentAxisScrollBarPosition="ChartScrollBarPosition.Top" />
</DxChart>

@code {
    IEnumerable<SaleInfo> SalesData;

    protected override async Task OnInitializedAsync() {
        SalesData = await Sales.GetSalesAsync();
    }
}
See Also