Skip to main content

DxChartArgumentAxis Class

Defines a chart’s argument axis.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll

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.
  • Alignment - Specifies the pane edge next to which to place an axis.
  • Inverted - Specifies whether an axis is inverted.
  • Offset - Specifies the shift of an axis.
  • CustomPosition - Specifies the position of an axis on another axis.
  • CustomPositionAxisName - Specifies the name of the value axis that the argument axis intersects on the CustomPosition value.
<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