我正在使用dimple.js来绘制图形,我读取了一个excel文件,并将数据放在.tsv文件中,我从那里读取了这些内容。
文件中的数据如下所示
country count site
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his IP
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his IP
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his IP
zeustracker.abuse.ch 1 his IP
zeustracker.abuse.ch 1 his dom
zeustracker.abuse.ch 1 his dom
rules.emergingthreats.net 1 NORT Ru
rules.emergingthreats.net 1 NORT Ru
rules.emergingthreats.net 1 NORT Ru
rules.emergingthreats.net 1 NORT Ru
但它显示的图表看起来像这样
这是代码,
<script type="text/javascript">
var svg = dimple.newSvg("#chartContainer", 600, 400);
d3.tsv("<?=$tsv_file;?>", function (data) {
var myChart = new dimple.chart(svg, data);
myChart.setBounds(80, 30, 510, 305)
var x = myChart.addCategoryAxis("x", "country");
myChart.addMeasureAxis("y", "count");
myChart.addSeries(["site"], dimple.plot.bar);
myChart.draw();
});
</script>
问题在于它在y轴上显示14K没有任何意义,Y轴应该有9个条目,3个用于其他,我做错了什么?