Skip to main content

BootstrapChartCommonAxisSettings.Offset Property

Specifies the shift of an axis along another axis in pixels.

Namespace: DevExpress.Web.Bootstrap

Assembly: DevExpress.Web.Bootstrap.v23.2.dll

NuGet Package: DevExpress.Web.Bootstrap

Declaration

[DefaultValue(typeof(decimal), "0")]
public decimal Offset { get; set; }

Property Value

Type Default Description
Decimal "0"

A decimal value that specifies a shift in pixels.

Property Paths

You can access this nested property as listed below:

Object Type Path to Offset
BootstrapPolarChart

Remarks

Chart axes cross at the argument axis and value axis minimum values.

To change the axes cross point coordinates, use any of the following properties:

  • The axis’ CustomPosition property to specify new cross point coordinates based on axis values.
  • The axis’ Offset property to shift an axis along another axis to the specified number of pixels.

The table below illustrates how different values of the Offset property affect Chart axes.

Axis

Offset

Effect

Argument

Positive number

Shifts the argument axis down.

Negative number

Shifts the argument axis up.

Value

Positive number

Shifts the value axis to the right.

Negative number

Shifts the value axis to the left.

Note

If the Rotated property is enabled, the Offset property treats the argument axis as the value axis, and the value axis as the argument axis.

The code below shifts the cross point 50 pixels to the right and 150 pixels up.

<dx:BootstrapChart ID="AxisPositionsChart" runat="server" ClientInstanceName="axisPositionsChart" TitleSettings-Text="Custom Axis Position">
    <SettingsCommonSeries Type="Scatter" />
    <SeriesCollection>
      ...
    </SeriesCollection>
    <ArgumentAxis Offset="-150" />
    <ValueAxisCollection>
        <dx:BootstrapChartValueAxis Offset="50" />
    </ValueAxisCollection>
</dx:BootstrapChart>

Bootstrap-Chart-Axis-Offset

Note

Online Demo: Chart - Axis Positions

See Also