Hello,
I have a spire doc licence I would like generate charts (Bar chart, PIE chart ...) but it seems to me that this is not possible to use Spire DOC and Spire XLS together.
How I can make to create charts ?
Thanks you,
//Create word document
Document document = new Document();
//Create a new section
Section section = document.AddSection();
//Create a new paragraph and append text
section.AddParagraph().AppendText("Column chart.");
//Create a new section to append column chart
Paragraph newPara = section.AddParagraph();
ShapeObject shape = newPara.AppendChart(ChartType.Column, 500, 300);
//Clear the chart's series data to start with a clean chart.
Chart chart = shape.Chart;
chart.Series.Clear();
//Add a custom series to the chart with categories for the X-axis, and large respective numeric values for the Y-axis.
chart.Series.Add("Test Series",
new[] { "Word", "PDF", "Excel", "GoogleDocs", "Office" },
new double[] { 1900000, 850000, 2100000, 600000, 1500000 });
//Set the number format of the Y-axis tick labels to group digits with commas.
chart.AxisY.NumberFormat.FormatCode = "#,##0";
//Save the result file.
document.SaveToFile("AppendColumnChart.docx", FileFormat.Docx);