KendoChart中的绘图线被截断

时间:2019-01-08 13:14:18

标签: javascript css kendo-ui kendo-chart

我想在数据表中显示微小的图,但是一旦隐藏categoryAxis,其附近的数据就会被截断。我该如何解决?

enter image description here

代码在这里:

<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>

http://jsfiddle.net/An59E/545/

0 个答案:

没有答案