我想在数据表中显示微小的图,但是一旦隐藏categoryAxis
,其附近的数据就会被截断。我该如何解决?
代码在这里:
<div class="container" id="example">
<div id="chart" style="width: 160px; height: 50px;"></div>
<script>
function createChart() {
$("#chart").kendoChart({
chartArea: {
background:"transparent"
},
legend: {
visible: false
},
seriesDefaults: {
type: "line",
width: 1,
markers: { visible: true, size: 10 },
style: "smooth"
},
series: [{
data: [1, 0, null, 9.284, 9.263, 9.801, 3.890, 8.238, 9.552, 6.855]
}],
valueAxis: {
visible: false,
majorGridLines: {
visible: false
},
axisCrossingValue: -10
},
categoryAxis: {
visible: false,
categories: [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011],
majorGridLines: {
visible: false
},
},
});
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
</div>