We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Formatting the Chart Axis to percentage

how do I set the number format for the chart axis? If this is my function what should I do to change the secondary axis to percentage format?

private void ChangeAxisScaleY2(Chart chart, double highValue, double lowValue)
chart.SecondValueAxis.MinValue = lowValue;
chart.SecondValueAxis.MaxValue = highValue;
chart.SecondValueAxis.IsAutomaticMinorUnit = true;
chart.SecondValueAxis.IsAutomaticMajorUnit = true;
chart.SecondValueAxis.CrossAt = lowValue;
chart.SecondValueAxis.CrossType = CrossType.Custom;


I think you may use:
chart.SecondValueAxis.TickLabels.NumberFormat attribute,
chart.SecondValueAxis.TickLabels.NumberFormat = “0.00%”;

Thank you.


Please try this code.