I've created a Highcharts implementation with a working jQuery-based radio button toggle "view select" between two charts: http://jsfiddle.net/6sAYF/ (it's in the lower-right)
here is the working jQuery function and corresponding html:
$(function() {
$("[name=toggler]").click(function(){
$('.toHide').hide();
$("#0829-"+$(this).val()).fadeIn('fast');
});
});
<div id="0829-1" class="toHide" ></div>
<div id="0829-2" class="toHide" style="display:none;width:780px;"></div>
<label><input id="rdb1" type="radio" name="toggler" value="1" checked/>%</label>
<label><input id="rdb2" type="radio" name="toggler" value="2" />2</label>
Where to start? Should I rewrite the function for Mootools? Use jQuery noconflict() mode and the original function?
My mootools version is here without toggle function: http://jsfiddle.net/JhWe6/
Many thanks to anyone with insight.
http://jsfiddle.net/JhWe6/10/
Per Highcharts support, the correct way for Highcharts to be hidden on a page is to use CSS style="position:relative; top:-9999em;" and update the CSS "top" in my case MooTools' setStyle('top', '0'). I also added $$('.toHide').setStyle('opacity', '0'); which makes the fade in nice.
You'll also notice that I needed to margin-bottom:-400px my first div. Is that the correct way to compensate for the now-rendered-as-blank bottom div?