How to Create the Line- Bar- StackedBar and Pie Chart from Data Table

Hi,

I want to create Chart in ASpose.Words… Is that Possible… I have given data below:

Datatable dt= new datatable();
dt.Column.Add("LowAvg",typeof(String);
dt.Column.Add("Avg",typeof(String);
dt.Column.Add("HighAvg",typeof(String);
dt.Column.Add("Gaol",typeof(String);
dt.Rows.Add("25","45","30","Goal1");
dt.Rows.Add("20","35","45","Goal2");
dt.Rows.Add("20","40","40","Goal3");
dt.Rows.Add("15","55","30","Goal4");

Please
Create the aspose charts (Line,Bar,StackedBar and Pie) and Send the
Code for me… I have already Checked the demo of the chart…
But i
could not understand the code… Now it is urgent… Please Send the code
for All Chart Type(Line,Bar,StackedBar and Pie) and send mail to my mail
Id : ameerudeenm@techneeq.com

I do not attached anything in this mail… Please send code as early as possible…

Thanks,

With regards,
M.Ameerudeen.

Hi,

Thanks for considering Aspose APIs

Please note, you can create all the mentioned charts using Aspose.Cells for .NET API.
However, as you have mentioned that you wish to create such charts with
the help of Aspose.Words for .NET API therefore I am going to move this
thread to the appropriate forum (Aspose.Words support forum) for
further assistance in this regard.

FYI:
If you want to create charts by Aspose.Cells, please try the attached code.

The code creates a MS-Word document with different charts as shown in the screenshot. I have also attached the output word document for your reference. To run the code, you will need both Aspose.Cells and Aspose.Words.

Hi,

I have created the chart with your code… But i could not open the xlsx file… I have attached screen shot in this mail… My table format are given below

dt.Columns.Add("A",typeof(string));
dt.Columns.Add("B",typeof(string));
dt.Columns.Add("C",typeof(string));
dt.Columns.Add("D",typeof(string));
dt.Columns.Add("E",typeof(string));
dt.Rows.Add("15","15","25","25","20");
dt.Rows.Add("30","20","15","10","25");
dt.Rows.Add("5","15","25","25","30");
dt.Rows.Add("15","10","30","25","20");
dt.Rows.Add("10","20","30","20","20");
dt.Rows.Add("25","5","15","25","30");

and also i wrote same code for GetCategoryData() and GetValueData(int rowIndex) functions… Please check the Coding.jpg
screen shot and reply me…

if i wrote the doc.Save(Filename, SaveFormat), then the Chart does not come properly in word document… I have attached
the Word Document Screen Shot(DocXSave.jpg) also… Please Check that and Please Reply me…

Thank You,

With regards,
M.Ameerudeen.

Hi,

I found the chart…Thank you very much…

With Regards,
M.Ameerudeen…

Hi M.Ameerudeen,

Thanks for using Aspose APIs.

It seems, your issue is resolved. Let us know if you are still facing any issue, we will look into it and help you asap.

Hi Shakeel,

Thanks for kind helpness… Can you send different code for Create Chart???

Thanks,

With regards
M.Ameerudeen.

Hi,

Thanks for your posting and considering Aspose APIs.

Please see the following documentation articles under this section that explains how to create charts using Aspose.Cells.

( Create and Manage Chart|Documentation )

Please also download the following Visual Studio 2013 project and run at your end. It will create output.docx file inside the bin\Debug directory.

Project Link: SampleProject.zip