[]
        
(Showing Draft Content)

Charts

Excel charts can be added in Template layout which are visible in the Excel report. It is very useful as charts are often used in Excel reports to display graphical data. Along with that, it provides an advantage that the final chart will always be updated with the latest data, when the template is processed.

The Excel charts are bound with template cells by specifying the series name, series value and axis labels in the template layout. While processing the template layout, the chart is bound to the data, and the Excel report is generated with the chart displaying final data. A chart can be placed in a worksheet with its data or in another worksheet too.

Follow the steps mentioned below to add chart in a template layout and configure its data to template cells:

Here we are adding a chart to a 'Sales Data' report which displays the sales of fruits and vegetables in different areas of North and South China by various salespersons. The chart in the template configures 'Salespersons' as series name, 'Sales' as series value and 'Products' as axis labels to display the sales of products in a graphical manner.

  1. Insert an empty chart in the Template layout in Excel.

    DsExcel Templates starts chart configuration with an empty chart inserted beside the bound data fields in the Excel template layout.

  2. Right click on the chart and choose 'Select Data' from context menu

    DsExcel Templates uses the chart context menu Select Data command to begin binding template fields to the chart.

  3. In the 'Select Data Source' dialog box, click 'Add' button to add a series for the chart.

    DsExcel Templates displays the Select Data Source dialog where the Add button creates a series from bound template fields.

  4. In the 'Edit Series' dialog box, click in 'Series Name' and then select 'ds.Salesman' field of the template layout as salesman field is being used as series for the chart.

    DsExcel Templates uses the Edit Series dialog to select the ds.Salesman field as the chart Series Name.

  5. Next, click in 'Series Values' and then select 'ds.Sales' field of the template layout as sales field is being used as the value for the series of the chart.

    DsExcel Templates uses the Edit Series dialog to select the ds.Sales field as the chart Series Values range.

  6. Click on the 'Edit' button highlighted in the below screenshot.

    DsExcel Templates uses the Select Data Source dialog Edit button to configure horizontal category axis labels for the chart.

  7. In the 'Axis Labels' dialog box, click in 'Axis Label Range' and then select 'ds.Product' field of the template layout as products field is being used as axis label of the chart.

    DsExcel Templates uses the Axis Labels dialog to select the ds.Product field as the chart Axis Label Range.

  8. Click Ok to submit the data configuration.

    DsExcel Templates displays the configured chart preview after product axis labels and sales series values are submitted.

After processing the template layout, the Excel report will look like below:

DsExcel Templates generates an Excel report containing the expanded bound data and a chart populated from the Salesman, Sales, and Product fields.