ChartAxisTitle class

ChartAxisTitle class

Provides access to the axis title properties. To learn more, visit the Working with Charts documentation article.

Properties

NameDescription
fontProvides access to the font formatting of the axis title.
formatProvides access to fill and line formatting of the axis title.
overlayDetermines whether other chart elements shall be allowed to overlap the title. The default value is false.
showDetermines whether the title shall be shown for the axis. The default value is false.
textGets or sets the text of the axis title. If null or empty value is specified, auto generated title will be shown.

Examples

Shows how to set chart axis title.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

let shape = builder.insertChart(aw.Drawing.Charts.ChartType.Column, 432, 252);

let chart = shape.chart;
let seriesColl = chart.series;
// Delete default generated series.
seriesColl.clear();

seriesColl.add("AW Series 1", [ "AW Category 1", "AW Category 2" ], [ 1, 2 ]);

let chartAxisXTitle = chart.axisX.title;
chartAxisXTitle.text = "Categories";
chartAxisXTitle.show = true;
let chartAxisYTitle = chart.axisY.title;
chartAxisYTitle.text = "Values";
chartAxisYTitle.show = true;
chartAxisYTitle.overlay = true;
chartAxisYTitle.font.size = 12;
chartAxisYTitle.font.color = "#0000FF";

doc.save(base.artifactsDir + "Charts.chartAxisTitle.docx");

See Also