Removing Selective Chart Series Dynamically
Column Chart in Microsoft Word Document
Creating a Column Chart
Practising the following steps, you can insert a Column Chart in MS Word 2013:
- Click in the document where you want to insert the chart, click the “Insert” tab, and then click “Chart” in the illustrations group to open the “Insert Chart” dialog box.
- Select “Column” in the sidebar, you will see a gallery of charts.
- Select the “100% Stacked Column” and press “OK” to insert the chart and Worksheet template to your document.
- Edit the Worksheet with your data to update the chart. See Chart Data (Excel).
- Save your Document.
As a report developer, you are required to share orders quantity of the customers dynamically with the following key requirements:
- A report must show the quantity of sales/orders.
- Sales/orders quantity must represented by Quarters.
- It must associate order quantity with the corresponding customer.
- The report must be generated in the Word Processing Document.
Adding Syntax to be evaluated by GroupDocs.Assembly Engine
Total Order Quantity by Quarters<<foreach [in orders .Where(c => c.OrderDate.Year == 2015) .GroupBy(c => c.Customer) .OrderBy(g => g.Key.CustomerName)]>><<x [Key.CustomerName]>>
Chart Data (Excel)
|1st Quarter«y[Where(c => c.OrderDate.Month>= 1 && c.OrderDate.Month <= 3).Sum(c => c.ProductQuantity)]»«removeif [mode== 1]»||2nd Quarter«y[Where(c => c.OrderDate.Month>= 4 && c.OrderDate.Month <= 6).Sum(c => c.ProductQuantity)]»«removeif [mode==2]»||3rd Quarter«y[Where(c => c.OrderDate.Month>= 7 && c.OrderDate.Month <= 9).Sum(c => c.ProductQuantity)]»||4th Quarter«y[Where(c => c.OrderDate.Month>= 10 && c.OrderDate.Month <= 12).Sum(c => c.ProductQuantity)]»|
Please download the sample Chart with Filtering, Grouping, and Ordering document we created in this article:
- Chart Template.docx (Template for CustomObject and JSON examples)