jquery - BarRenderer changing the default color -
i'm using jqplot , i'm wondering if instead of showing bars in 'blue', show them in 'red' or whatever want :
jquery(document).ready(function(){ var data = <?php echo $times; ?>; var plot1 = jquery.jqplot('chart-time', [data], { title:'pages per hours', stackseries: true, seriesdefaults: { renderer: jquery.jqplot.barrenderer, rendereroptions:{barmargin: 10, shadow:false}, pointlabels:{show:true, stackedvalue: true} }, axes: { xaxis:{renderer:jquery.jqplot.categoryaxisrenderer, label:'(hours)'} } }); });
thanks
you can adding color
property seriesdefaults
:
jquery(document).ready(function(){ var data = <?php echo $times; ?>; var plot1 = jquery.jqplot('chart-time', [data], { title:'pages per hours', stackseries: true, seriesdefaults: { renderer: jquery.jqplot.barrenderer, rendereroptions:{barmargin: 10, shadow:false}, pointlabels:{show:true, stackedvalue: true}, color: '#ff6666' }, axes: { xaxis:{renderer:jquery.jqplot.categoryaxisrenderer, label:'(hours)'} } }); });
Comments
Post a Comment