Axis Titles
The axis title is a short text displayed alongside the axis. Usually, the axis title shows units of measurement for axis values, but you can put any text in it.
The axis title is configured by the title option. If you assign an object to it, specifying the text field of this object is necessary for the axis title to be displayed. Besides the object, the title option accepts a string, thus providing a shortcut for setting the axis title. Therefore, this:
jQuery
JavaScript
$(function() { $("#chartContainer").dxChart({ // ... argumentAxis: { // or valueAxis title: 'Axis Title' } }); });
Angular
HTML
TypeScript
<dx-chart ... > <dxo-argument-axis title="Axis Title"> </dxo-argument-axis> </dx-chart>
import { DxChartModule } from "devextreme-angular"; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxChartModule ], // ... })
is the same as this:
jQuery
JavaScript
$(function() { $("#chartContainer").dxChart({ // ... argumentAxis: { // or valueAxis title: { text: 'Axis Title' } } }); });
Angular
HTML
TypeScript
<dx-chart ... > <dxo-argument-axis> <dxo-title text="Axis Title"></dxo-title> </dxo-argument-axis> </dx-chart>
import { DxChartModule } from "devextreme-angular"; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxChartModule ], // ... })
In addition to the text field, the title object may contain fields that specify the font and margin of the axis title.
See Also
Feel free to share demo-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you!
We appreciate your feedback.
We appreciate your feedback.