I am working of d3 as well as with rickshaw.js. i have made the graph and the legend in a single container. so when the legend drop down is clicked it slides down. i am trying to shrink the graph area when the drop down slides down. as well as when the drop down slides up, the graph has to regain its original structure.any help or suggestions. as i even tried with the example with i have fiddled it. does not seemed to work.http://jsfiddle.net/YrhF3/1/ . thanks in advance
Here is my fiddled code:
$(function()
{
var expanded = false;
$('.dropdownlegend').click(function(){
if (!expanded)
{
$('.scatterchart').animate({width:'30%'}, 400);
expanded = true;
}
else
{
$('scatterchart').animate({width:'59%'}, 400);
expanded = false;
}
});
});