我使用谷歌的图表javascript api来显示一些数据。数据包含“0”/“null”值。
//...
totalpt1.setValue(154, 2, 1310799);
totalpt1.setValue(155, 2, 1313905);
totalpt1.setValue(156, 2, null);
totalpt1.setValue(157, 2, 1320264);
totalpt1.setValue(158, 2, 1323102);
//...
var chart11 = new google.visualization.LineChart(document.getElementById('chart_totalpostthreads'));
chart11.draw(totalpt, {width: 600, height: 340, interpolateNulls:true, legend: 'bottom', title: 'Total Posts'});
结果是这样的:
我已将 interpolateNulls 设置为 true。但该图仍然没有“平滑”。我怎样才能防止那些单例辍学的人?我认为这就是插值选项的用途......
最佳答案
Null 和 0 是不同的值。
关于javascript - 在谷歌图中插入空值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9748182/