blazor-devexpress-dot-blazor-dot-dxrangeselectorchartvalueaxis-40d79f03.md
Specifies the value to be raised to a power when DxRangeSelectorChart generates ticks for the value axis of the Logarithmic type.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(10)]
[Parameter]
public int LogarithmBase { get; set; }
| Type | Default | Description |
|---|---|---|
| Int32 | 10 |
A logarithm base.
|
The DxRangeSelectorChart component determines the data type of the first series in the markup and uses it to render the value axis.
When values grow rapidly, set the value axis’s Type property to ChartAxisType.Logarithmic to visualize a data set exponentially. Each axis value equals the LogarithmBase property value raised to a power. For instance, if LogarithmBase is set to 10, the chart displays the following values: 10⁻², 10⁻¹, 10⁰, 10¹, 10², etc.
The following example displays two Range Selector components with value axes of Continuous and Logarithmic types. The LogarithmBase property for the second component’s chart is set to 2.
<DxRangeSelector Width="500px"
Height="300px"
Data="@Data">
<DxTitleSettings Text="Population by Country, 2023" />
<DxRangeSelectorChart>
<DxRangeSelectorChartValueAxis Type="ChartAxisType.Continuous"/>
<DxChartLineSeries ArgumentField="@((DataPoint s) => s.Argument)"
ValueField="@((DataPoint s) => s.Value)">
<DxChartSeriesPoint Visible="true" />
</DxChartLineSeries>
</DxRangeSelectorChart>
</DxRangeSelector>
<DxRangeSelector Width="500px"
Height="300px"
Data="@Data">
<DxTitleSettings Text="Population by Country, 2023" />
<DxRangeSelectorChart>
<DxRangeSelectorChartValueAxis Type="ChartAxisType.Logarithmic"
LogarithmBase="2"/>
<DxChartLineSeries ArgumentField="@((DataPoint s) => s.Argument)"
ValueField="@((DataPoint s) => s.Value)">
<DxChartSeriesPoint Visible="true" />
</DxChartLineSeries>
</DxRangeSelectorChart>
</DxRangeSelector>
@code {
List<DataPoint> Data;
protected override void OnInitialized() {
Data = GetData();
}
}
List<DataPoint> GetData() {
List<DataPoint> result = new List<DataPoint>(9);
result.Add(new DataPoint("Whisper", 0.15));
result.Add(new DataPoint("Street noise", 8));
result.Add(new DataPoint("Jackhummer", 32));
result.Add(new DataPoint("Subway train", 64));
result.Add(new DataPoint("Loud music", 128));
result.Add(new DataPoint("Pain threshold", 256));
result.Add(new DataPoint("Buzzer", 512));
result.Add(new DataPoint("Rocket start", 2048));
result.Add(new DataPoint("Deadly level", 16348));
return result;
}
public class DataPoint {
public DataPoint(string argument, double value) { Argument = argument; Value = value; }
public string Argument { get; set; }
public double Value { get; set; }
}
See Also
DxRangeSelectorChartValueAxis Class