---
title: Quick Chart Setup
description: If you would like to insert a chart in your document, this article explains step by step process to do it. Before proceeding with the steps to insert a chart into your document, ensure you complete the following prerequisites to…
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-packs/quick-chart-setup/"
updated: "2025-06-16"
category: PDF BUTLER PACKS
---

# Quick Chart Setup

If you would like to insert a chart in your document, this article explains step by step process to do it. Before proceeding with the steps to insert a chart into your document, ensure you complete the following prerequisites to use this feature.

[QuickChart](http://quickchart.io) is the opensource code which is used to develop these. Once you install the package, you can see the apex class which is using this open source code to display the charts.

[Quick Chart Setup](https://www.youtube.com/embed/vdnK7NeujMo?si=SLHc4hQ5vHUqg8jq)

###### Prerequisites

- Install package: Paste below URL to your org URL and install the package
   /packaging/installPackage.apexp?p0=04t3X000002xTjk
- Setup below permissions in the PDF Butler Admin Local Permission set which was created during PDF Butler installation.
   ![Quick Chart Picture1](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture1.png)

##### Example

Let's say, you want to show the overview of the amounts per month of the opportunities. You can do this by following below steps.

###### Doc Config Document Template

Download the Doc Config Document Template [here](https://pdfbutler.com/wp-content/uploads/2025/06/pdfbutler_QuickChart-Opportunities_main.docx) and this document will have a picture placeholder which will act as a container for the Chart. This picture placeholder can be downloaded from [here](https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-by-configtype/picture/) and a merge field should be mapped to this picture placeholder in the document.

###### Data Sources

Create two Data Sources as shown below
 1) SOQL Data Source which will fetch the opportunities
 ![Quick Chart Picture3](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture3.png)
 2) KEYVALUE Data Source of type Single sObject
 ![Quick Chart Picture4](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture4.png)

###### Doc Config

Create a main word document Doc Config of BASE64 Type.
 ![Quick Chart Picture2](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture2.png)

Add the two Data Sources to the Doc Config by opening PDF Butler from Doc Config and Edit the KeyValue Data Source, then add the fields “pdfbutler_id” and “pdfbutler_charturl”.
 ![Quick Chart Picture7](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture7.png)

Under the KeyValue Data Source add a child Data Source as shown below and Map Id , URL fields to the above fields.
 ![Quick Chart Picture8](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture8.png)
 ![Quick Chart Picture9](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture9.png)

Create a Picture Config type for the Placeholder in the document.
 ![Quick Chart Picture10](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture10.png)

###### Actionable record

Create an Actionable record of type 'Quick Chart' to the above Doc Config as shown below.

- Actionable class - PDFButler_Act_ChartMultiDataSet
- Chart type - Choose this according to your requirement and in this example, it is Stacked Bar.
   ![Quick Chart Picture6](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture6.png)
- Chart DataSet1 - The PDF Butler DataSource that selects the data required to create the chart
- Chart Target Data Source - The PDF Butler DataSource that will receive the URL for the chart. This DataSource will get 2 extra fields by the Actionable: "pdfbutler_id" and "pdfbutler_charturl"
- Chart Label field - the field API name that has the labels for the chart, in most cases for the X-axis
- Chart DataSet1 Field - The field API name of the label for the DataSet. Leave this field empty for Pie, Doughnut, Polar Area, Radial Gauge
- Chart DataSet1 Value Field - The field API Name that has the datapoints or values for the chart
- Chart Show X-Axes Label - The name of the label field on the X-Axis (if Cartesian chart)
- Chart Show Y-Axes Label - The name of the label field on the y-Axis (if Cartesian chart)
   ![Quick Chart Picture5](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture5.png)

###### Testing

Add the Doc Config to the Account page and generate the document with the stacked chart.
 ![Quick Chart Picture11](https://pdfbutler.com/wp-content/uploads/2025/06/Quick-Chart-Picture11.png)
