我正在使用jqplots生成条形图。我能够为整个数字生成精确的图表。但是我无法为具有小数点的值生成图表。下面是我用的代码:如何绘制JQPlot条形图中的十进制值?
<script type="text/javascript">
$(document).ready(function(){
$.jqplot.config.enablePlugins = true;
var s1 = ['1.5','3.0', '0.0', '0.0', '0.0', '3.0', '0.0'];
var ticks = ['New mould', 'Raw Material', 'color/size', 'Imported/Catalogue' , 'Printing' , 'plating' , 'other'];
plot1 = $.jqplot('chart1', [s1], {
// Only animate if we're not using excanvas (not in IE 7 or IE 8)..
animate: !$.jqplot.use_excanvas,
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
pointLabels: { show: true }
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks
},
yaxis: { tickOptions: { formatString: '%.2f' } }
}, highlighter: { show: false }
});
$('#chart1').bind('jqplotDataClick',function (ev, seriesIndex, pointIndex, data)
{
$('#info1').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
}
);
});
</script>
我收到erroe如下:
这个[R] ._蜱[0]未定义 http://blrsrigwd11074.itcinfotech.com:81/Windchill/netmarkets/javascript/report/plugins/jqplot.pointLabels.min.js 线57
请帮帮我在这个问题上。
谢谢:)你是对的:) – galme 2014-09-25 06:32:29