如何为Telerik Kendo UI饼图楔形着色?

Rod*_*ney 6 javascript jquery telerik jquery-plugins kendo-ui

我正在使用Telerik Kendo饼图,我希望能够为楔子上色.

以下是我的Kendo UI饼图的标记:

<script type="text/javascript">
function createChart() {
    jQuery("#chart").kendoChart({
        theme: jQuery(document).data("kendoSkin") || "Metro",
        legend: {
            position: "bottom"
        },
        seriesDefaults: {
            labels: {
                visible: true,
                format: "{0}%"
            }
        },

        series: [{
            type: "pie",
            data: [{
                category: "Remaining Work",
                value: 75,
                explode: true
            }, {
                category: "CIOs",
                value: 2
            }, {
                category: "Other Executives",
                value: 10
            }, {
                category: "Directors and Physicians",
                value: 13
            }]
        }],
        tooltip: {
            visible: true,
            format: "{0}%"
        }
    });
}

jQuery(document).ready(function () {
    setTimeout(function () {
        createChart();

        // Initialize the chart with a delay to make sure
        // the initial animation is visible
    }, 400);

    jQuery(document).bind("kendo:skinChange", function (e) {
        createChart();
    });
});
 </script>
Run Code Online (Sandbox Code Playgroud)

我希望剩下的工作是浅灰色的.我该如何做到这一点?

任何建议,将不胜感激.

小智 19

Kendo UI DataViz中,所有图表都支持通过seriesColors选项覆盖主题颜色.此属性将采用十六进制颜色字符串数组.例如:

$("#chart").kendoChart({
   ...
   seriesColors: ["#7c7c7c", ... ]
});
Run Code Online (Sandbox Code Playgroud)