Customizing Chart Axes with a Theme
-
Hi, thanks so much for the awesome plugin!
I am attempting to style the chart axes using a theme, which I’ve created from looking through this forum + your documentation. I’ve got the charts I want mostly styled, but I can’t seem to access the scales/axes labels, titles, etc. using the
$theme['options']['plugins']['scales[x]']['font']['size']
– I’m wondering if the['scales[x]']
portion can’t be parsed?Here’s my code, for reference
<?php /** * Theme Name: LEAD Default Bar Graph */ $theme = array( 'colors' => array( '#00869D', '#00A688', '#37B8CB', '#006B74', '#008A69', ), ); //Title options $theme['options']['plugins']['title']['color'] = '#062F35'; $theme['options']['plugins']['title']['font']['family'] = "'trade-gothic-next-condensed', Sans-serif"; $theme['options']['plugins']['title']['font']['weight'] = 700; $theme['options']['plugins']['title']['font']['size'] = 48; //Legend Options $theme['options']['plugins']['legend']['labels']['color'] = '#062F35'; $theme['options']['plugins']['legend']['labels']['font']['family'] = "'trade-gothic-next-condensed', Sans-serif"; $theme['options']['plugins']['legend']['labels']['font']['size'] = 21; //X-Axis Options $theme['options']['plugins']['scales[x]']['title']['text'] = 'Test'; $theme['options']['plugins']['scales[x]']['font']['family'] = "'trade-gothic-next-condensed', Sans-serif"; $theme['options']['plugins']['scales[x]']['font']['size'] = 21; return $theme;
Any help is appreciated!
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Customizing Chart Axes with a Theme’ is closed to new replies.