ChartAxisNumberFormat Property
Returns a ChartNumberFormat object that allows defining number formats for the axis.

Namespace: Aspose.Words.Drawing.Charts
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 20.1
Syntax
public ChartNumberFormat NumberFormat { get; }

Property Value

Type: ChartNumberFormat
Examples
Shows how to set formatting for chart values.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert chart
Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
Chart chart = shape.Chart;

// Clear demo data
chart.Series.Clear();

chart.Series.Add("Aspose Test Series",
    new string[] { "Word", "PDF", "Excel", "GoogleDocs", "Note" },
    new double[] { 1900000, 850000, 2100000, 600000, 1500000 });

// Set number format
chart.AxisY.NumberFormat.FormatCode = "#,##0";

// Set this to override the above value and draw the number format from the source cell
Assert.False(chart.AxisY.NumberFormat.IsLinkedToSource);
See Also