Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxChartAnnotation.Axis Property

Specifies the axis name to anchor the annotation.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public string Axis { get; set; }

#Property Value

Type Description
String

The axis name.

#Remarks

DxChart allows you to anchor annotations to value and argument axes. If your chart component contains multiple axes, specify the Axis property to anchor the annotation to a particular axis.

razor
<DxChart Data="SalesData">
    @* ... *@
    <DxChartValueAxis Name="Amount">
        @* ... *@
        <DxChartAxisTitle Text="Amount" />
    </DxChartValueAxis>
    <DxChartValueAxis Name="TotalAxis" Alignment="ChartAxisAlignment.Far">
        <DxChartAxisTitle Text="Total Amount" />
    </DxChartValueAxis>
    <DxChartAnnotation Value="0.6"
                       Axis="Amount"
                       Text="This annotation is anchored to the specified value axis."
                       Opacity="1"
                       HorizontalOffset="250">
        @* ... *@
    </DxChartAnnotation>
    <DxChartFullStackedBarSeries Name="2017"
                                 Filter="@((SaleInfo s) => s.Date.Year == 2017)"
                                 SummaryMethod="Enumerable.Sum"
                                 ArgumentField="@(s => s.City)"
                                 ValueField="@(s => s.Amount)" />
    <DxChartSplineSeries Name="Total"
                         SummaryMethod="Enumerable.Sum"
                         ArgumentField="@((SaleInfo s) => s.City)"
                         ValueField="@(s => s.Amount)"
                         Axis="TotalAxis" />
</DxChart>

Chart - Anchor annotation to value axis

See Also