1

我正在尝试在 DIV 中显示 KendoUI 图表并查看 LOG 中的内容:

属性 width="-10px" 的负值无效

这是代码:

<div id="chart"></div>

这是javascript:

$("#chart").kendoChart({
            theme: "Metro",
            legend: {
                position: "right",
                labels: {
                    font: "12px arial",
                    color: "white"
                },
            },
            chartArea: {
                background: "",
            },
            dataSource: data,
            series: [
                {
                    type: "pie",
                    field: "itemTotal",
                    categoryField: "itemNameAndTotal",
                    explodeField: "exploded"
                }
            ],
            tooltip: {
                visible: true,
                template: "${ category }"
            }
        });

这是CSS:

#chart {
    background: #f9a600;
    border-radius: 5px;
    margin: 10px 5px 5px 5px;
    padding: 5px;
}

谢谢您的帮助!

4

0 回答 0