A few questions about BarChart

Hi,

I have a few questions here:

1) May I know how to format the data labels of a BarChart? And the labels of Category Axis, Value Axis and Legend as well?

2) It seems like the code below does not take effect when I view the exported chart. Is it a bug or anything I miss out?

chart.Legend.Width = 400;
chart.Legend.Border.IsVisible = false;


Hi, thanks for your considerations.

Chart apis are very complicated and we are keeping on enhancing it. The features you mentioned above is not fully supported yet. Please tell me your expected date for these features. I will do it ASAP.

Now I suggest you can manually put charts into designer file.

Thanks for your prompt response. If possible, I hope the features can be included before end of this month as my project deadline is end of this month.

Thanks in advance!

I will start to do these features within about two days and I will try my best to meet your need. Now thanks for your patience.

@forbi,
We would like to introduce our latest product Aspose.Cells which has replaced the older product AAspose.Excel which is discontinued now. You can implement all the latest type of charts using this new product which is supported in the latest versions of MS Excel. You may try the following sample code which demonstrates the creation of charts using this latest product:

// Instantiating a Workbook object
Workbook workbook = new Workbook();

// Adding a new worksheet to the Excel object
int sheetIndex = workbook.Worksheets.Add();

// Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[sheetIndex];

// Adding sample values to cells
worksheet.Cells["A1"].PutValue(50);
worksheet.Cells["A2"].PutValue(100);
worksheet.Cells["A3"].PutValue(150);
worksheet.Cells["B1"].PutValue(4);
worksheet.Cells["B2"].PutValue(20);
worksheet.Cells["B3"].PutValue(50);

// Adding a chart to the worksheet
int chartIndex = worksheet.Charts.Add(Aspose.Cells.Charts.ChartType.Pyramid, 5, 0, 15, 5);

// Accessing the instance of the newly added chart
Aspose.Cells.Charts.Chart chart = worksheet.Charts[chartIndex];

// Adding SeriesCollection (chart data source) to the chart ranging from "A1" cell to "B3"
chart.NSeries.Add("A1:B3", true);

// Saving the Excel file
workbook.Save(dataDir + "output.xls");

You can follow the kink below to check all the chart related features in detail:
Charts

For trial purpose download the latest version here:
Aspose.Cells for .NET (Latest Version)

A running solution containing all the sample codes can be downloaded here.