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

Free Support Forum - aspose.com

PIVOT - auto size graph

Hi, How can I make the size of graph are auto size or big. here is the picture of graph that not in the right size.
graph not size.png (13.0 KB)

I would like it to size like this, or maybe fit with the graph without manually resize it. here is the picture of graph with more large size
graph size.png (20.5 KB)

and lastly, can I set the symbol $ on entire column like the picture below?
Symbol $.png (7.7 KB)

Thanks in advance.

@sitizalekoh,

Thanks for the screenshots.

Well, you may try to extend the width and height of the added chart as following:
e.g
Sample code:

…
Aspose.Cells.Charts.Chart chart = workbook.Worksheets[0].Charts[i];
chart.ChartObject.Height = 700;
chart.ChartObject.Width = 600; 

It looks like the chart is Pivot chart so you may specify correct parameters value (in ChartCollection.Add() method) accordingly when adding the chart to the worksheet accordingly (to extend the chart height and width):
upper left row, upper left column, lower right row and lower right column.

You may apply your desired numbers formatting to the pivot field, see the following sample code for your reference:
e.g
Sample code:

.........
int index = 2;
pivotTable.DataFields[index].Function = ConsolidationFunction.Sum;
            pivotTable.DataFields[index].NumberFormat = "$#,##0.00;$-#,##0.00";

Hope, this helps a bit.