Skip to main content
Chartlet

How to create a Line chart in WordPress via shortcode

Add a line chart in seconds with a single shortcode. Chartlet renders Chart.js on the front end with zero database overhead.

1. Install Chartlet

Install the Chartlet plugin from the WordPress repository or upload the plugin files. Activate it—no configuration required.

2. Add the shortcode

In the block editor or classic editor, add the following shortcode where you want the chart to appear:

[chartlet type="line" labels="Mon,Tue,Wed,Thu,Fri" data="30,45,35,50,49" colors="#3366cc" title="Weekly Traffic" height="300" prefix="" suffix="%"]

3. Customize (optional)

You can set a title, colors, or other options via shortcode attributes. See the full docs for all options.

← Back to Chartlet