We save the previous chart as a new file and begin making our modifications as follows:
We want an array containing various shades of the purple used by the company. We can use these colors for our lines, bars, pie wedges, and even our backgrounds. We also want this in a central place along with the functions to help us theme our charts. With that in mind, we create a file called
themes.js
and add an array calledcompany_colors
to hold our shades of purple as follows:var company_colors = [ "#400040", "#8C008C", "#D8BFD8", "#DE6FA1", "#9400D3" ];
Next, we return to our file containing our HTML,
1168_10_03.html
. We include thethemes.js
file in our HTML. After settingdataRendererOptions
, we setseriesDefaults
. Inside this object, we setrendererOptions
and then setsmooth
totrue
. We also setseriesColors
to thecompany_colors
array inthemes.js
as follows:<script src="../js/themes.js"></script> ... dataRendererOptions: { dataCallback...