Highcharts Themes
Available since version 1.2 (Highcharts).
Custom Highcharts themes are created by adding PHP files to an m-chart-highcharts-themes directory inside your active WordPress theme folder:
wp-content/themes/your-theme/
└── m-chart-highcharts-themes/
└── my-theme.php
Built-in Themes
| Theme | Description |
|---|---|
| Highcharts 4.x/5.x (Default) | The default Highcharts 4/5 color scheme |
| Color Blind Safe | Accessible color palette |
| Highcharts 3.x | Color scheme from Highcharts 3 |
| Highcharts 2.x | Color scheme from Highcharts 2 |
Creating a Custom Theme
A theme file declares its name in a Theme Name: docblock header (required — files without one are skipped) and returns a Highcharts options array:
<?php
/**
* Theme Name: My Highcharts Theme
*/
return [
'colors' => [ '#7cb5ec', '#434348', '#90ed7d', '#f7a35c' ],
'chart' => [
'backgroundColor' => '#ffffff',
'style' => [
'fontFamily' => 'sans-serif',
],
],
];
The returned array is merged directly into the Highcharts configuration object, so most valid Highcharts options can be set here (colors, chart, plotOptions, etc. at the top level).
Filtering Available Themes
Use the m_chart_highcharts_available_themes filter to add, remove, or modify themes programmatically.