bootstart chart.js 图表将数字小数去除

xAxis : [ {
		type : 'value',
		axisLabel: {
	       formatter:function(value,index){return parseInt(value);}
			 }
			} ],

上面 的x轴  type 是value 当值是数字时可能会有小数点,或者.0 .5等小数,

我们在大括号内加入红色的部分就可以了

猜你喜欢

转载自blog.csdn.net/woaiqianzhige/article/details/78329491