Following quite a few people wanting to modify the highcharts as provided (cumuluscharts.js), the beteljuice has created a 'plug-in' for the HTML page that holds them.
This script allows you to completely remove or change the default visibility of plots
created by cumuluscharts.js.
It can now rename / translate your titles / labels / tooltips etc.
Wherever your holding page is generated is and this javascript file is where you need to edit.
It will NOT remove graphs (edit your buttons for that).
You cannot remove the 'first' plot in any graph (the beteljuice seriously can't be bothered to write code for that !)
Here's the script and a README
Usage:
Edit graphfixPro.js as per the README, some examples below and upload to same directory as 'charts' page.
At the bottom of the page containing the charts ADD below all the charts scripts
<script src="graphfixPro.js"></script>
Important:
Then in the same page edit ALL the 'buttons' for the graphs
so that they end with rollout();
<input name="btnTemp" class="button" style=tabindex="1" type="button" value="Temperature" onclick="changeGraph('temp'); rollout();">
EXAMPLES:-
Names are case sensitive and ENGLISH.
GRAPH name is the 'main' title at the top of the graphs.
PLOT names are the individual traces.
NB: "Temperature" GRAPH has a "Temperature" PLOT !
Code: Select all
// beteljuice plot REMOVER - cannot remove first plot of graph !!
// format: ['graph name', 'plot to lose 1', 'plot to lose 2'], NB: NO comma after last (or only) entry !
example: single graph, single plot
lose_plot = [
["Temperature", "Inside"]
];
example: single graph, muliple plots
lose_plot = [
["Temperature", "Dew Point", "Wind Chill", "Heat Index"]
];
example: multiple graphs, muliple plots
lose_plot = [
["Temperature", "Dew Point", "Wind Chill", "Heat Index"],
["Relative Humidity", "Indoor Humidity"]
];
// ** A little bit more involved **
// beteljuice plot default VISIBILY - CAN hide first plot of graph
// format: ['graph name', ['plot to show / hide 1', true],
// ['plot to show / hide 2', false] NB: NO comma after last plot !
// ], NB: NO comma after last graph !
example: single graph, single plot
display_plot = [
["Temperature", ["Temperature", false]]
];
example: single graph, multiple plots
display_plot = [
["Temperature", ["Temperature", false], ["Wind Chill", true]]
];
example: multiple graphs, multiple plots
display_plot = [
["Temperature", ["Temperature", false], ["Wind Chill", true]],
["Relative Humidity", ["Indoor Humidity", false]]
];
Information on translating is in the README and the file itself.
If you've already modified the distribution copy of the cumuluscharts.js ... you're on your own