Skip to main content
A newer version of this page is available. .

DxChartArgumentAxis Class

Defines a chart’s argument axis.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public class DxChartArgumentAxis :
    DxChartAxis<ChartArgumentAxisModel>

Remarks

You can add the following child components to the argument axis:

The image below shows axis elements:

Charts - Axis Elements

<DxChart>
  ...
  <DxChartArgumentAxis>
      <DxChartAxisLabel Format="ChartAxisLabelFormat.MonthAndDay" Visible="true"/>
      <DxChartConstantLine Value="@("2019-Dec-31")">
          <DxChartConstantLineLabel VerticalAlignment="VerticalAlignment.Top" 
                                    Position="RelativePosition.Inside"/>
      </DxChartConstantLine>
      <DxChartAxisTitle Text="Date" HorizontalAlignment="HorizontalAlignment.Left"/>
  </DxChartArgumentAxis>
  ... 
</DxChart>        

Additionally, you can use the following properties to configure the axis:

  • ArgumentType - Specifies whether and how to cast arguments that come from the assigned data source.
  • Type - Specifies an axis type.
  • SideMarginsEnabled - Specifies whether the component should add margins between the outermost series points and the chart boundaries.
  • EndOnTick - Specifies whether an axis should start and end on ticks.
<DxChart Data="@forecasts">
    <DxChartTitle Text="Weather Forecast">
        <DxChartSubTitle Text="(10 days)" />
    </DxChartTitle>
    <DxChartArgumentAxis ArgumentType="ChartAxisDataType.DateTime"
                         Type="ChartAxisType.Continuous"
                         SideMarginsEnabled="false"
                         EndOnTick="true">
        <DxChartAxisTitle Text ="Date" />
        <DxChartAxisLabel Format="ChartAxisLabelFormat.ShortDate" />
    </DxChartArgumentAxis>
    @*...*@
    <DxChartBarSeries ArgumentField="@((WeatherForecast i) => i.Date)"
                      ValueField="@((WeatherForecast i) => i.Precipitation)"
                      Name="Precipitation">
    </DxChartBarSeries>
    <DxChartLineSeries ArgumentField="@((WeatherForecast i) => i.Date)"
                       ValueField="@((WeatherForecast i) => i.TemperatureC)"
                       Name="Temperature"
                       Axis="Temperature">
    </DxChartLineSeries>
    @*...*@
</DxChart>

Charts - Argument Axis - Properties

The DxChart component can contain several argument axes but the Chart can display only the last created axis.

Inheritance

Object
ComponentBase
DxSettingsComponent<DevExpress.Blazor.Internal.ChartArgumentAxisModel>
DxComplexSettingsComponent<DxChartAxis<DevExpress.Blazor.Internal.ChartArgumentAxisModel>, DevExpress.Blazor.Internal.ChartArgumentAxisModel>
DxChartAxis<DevExpress.Blazor.Internal.ChartArgumentAxisModel>
DxChartArgumentAxis
See Also