简体   繁体   中英

How to add a chart to a PowerPoint slide using think-cell chart?

I am trying to use think-cell chart, a 3rd party software add-in for PowerPoint. I wanted to replace the default chart when calling the addChart() method and use the think-cell chart instead.

shape = MySlider.Shapes.AddChart(Microsoft.Office.Core.XlChartType.xlColumnStacked, 40, 40, 500, 500);

the above snippet is to add chart in slide in the PowerPoint, but it uses the default chart of the PowerPoint.

First create a think-cell chart template (by inserting, as usual, a think-cell chart from the Elements menu into a new file, which you can save then as a template).

Then create program logic to update a copy of this template chart. You can do this either with JSON or with VBA or C# from Excel. In the Excel case, either use think-cell's UpdateChart or PresentationFromTemplate functions. For JSON and UpdateChart, you must also give the chart a name to identify it, using think-cell's menu when you select the chart, by entering the name in the "UpdateChart Name" field.

Note that our manual provides additional and up-to-date information as well as examples, https://www.think-cell.com/support/manual/introductionautomation.shtml You may also contact us directly on support(at)think-cell(dot)com.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM