var options = {
series: {lines: {fill: true, fillColor: "rgba(255, 255, 204, 0.5)"} },
xaxis: { mode: "time", timeformat: "%d %b %y", minTickSize: [1, "month"]} ,
yaxis: { max: 50000}
};
var d3;
var plot;
$(document).ready(function(){
d3 = <?echo $balarray;?>;
plot = $.plot($("#placeholder"), [d3],options );
$("#calInput1").blur(function(event){
$(this).clear();
});
$('#show').click(function(){
$.post("/sandbox/graphloader",{calInput1:$('#calInput1').val(), calInput2:$('#calInput2').val()} ,function(data) {
plot.setData(data);
plot.draw();
});
});
});
I am trying to do ajax call to a kohana controller with this. I want to redraw it on click of a button. why isn't the redraw working ?? (At load it is showing the graph fine)