0
我使用Highcharts解析HTML表并从中生成一个列图。问题是,当我使用数字或日期,如标题,图表添加'失踪'年。Highcharts列图,从数据表加载时禁用插值
见工作实例上的jsfiddle:
表:
<table id="datatable">
<thead>
<tr>
<th></th>
<th>Jane</th>
</tr>
</thead>
<tbody>
<tr>
<th>2006</th>
<td>3</td>
</tr>
<tr>
<th>2008</th>
<td>2</td>
</tr>
<tr>
<th>2009</th>
<td>5</td>
</tr>
<tr>
<th>2011</th>
<td>1</td>
</tr>
<tr>
<th>2012</th>
<td>2</td>
</tr>
</tbody>
</table>
而且配置:
$('#container').highcharts({
data: {
table: 'datatable'
},
chart: {
type: 'column'
},
yAxis: {
allowDecimals: false,
title: {
text: 'Units'
}
},
plotOptions: {
series: {
connectNulls: false
}
}
});
我试着使用connectNulls: false
但它没有任何效果。
有没有让2007年和2010年未出现在图表中的设置?我希望图表只使用HTML中的数据并且不使用插值或任何东西。
我希望你能帮忙!谢谢!
约翰