KendoUI中的向下钻取图表可行性 [英] Drilldown Chart Feasibility in KendoUI

查看:88
本文介绍了KendoUI中的向下钻取图表可行性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望创建一个类似附件的图表.我尝试在Microsoft Excel中创建此文件. KendoUI可以吗?

I am looking to create a chart something like enclosed. This I tried creating in Microsoft Excel. Is it possible with KendoUI?

推荐答案

是的,您可以很容易地创建类似的东西.这是一个示例,如果您需要个性化帮助,请告诉我.

Yes you can create something like this very easily. Here is an example, let me know if you need help personalize it.

您的html:

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

您的JavaScript:

Your javascript:

<script>
    function createChart() {
        $("#chart").kendoChart({
            title: {
                text: "Chart Title"
            },
            legend: {
                position: "bottom"
            },
            seriesDefaults: {
                type: "area",
                area: {
                    line: {
                        style: "smooth"
                    }
                }
            },
            series: [

               {
                name: "Late",
              color: "orange",
                data: [2, 2, 3, 4,4,5, 5,6, 6, 7]
            }, {
              type: "line",
                name: "Est DT",
              color:"grey",
                data: [2, 2, 4, 8,8,8, 8,8, 8,8]
            },
            {
                name: "On time",
              color: "blue",
                data: [2, 2, 3, 3, 3, 3, 4, 4, 4, 5]
            }],
            valueAxis: {
                labels: {
                    format: "{0}"
                },
                line: {
                    visible: false
                },
                axisCrossingValue: -10
            },
            categoryAxis: {
                categories: ["Jan 19", "Feb 19", "Mar 19", "Apr 19", "Mai 19", "Jun 19", "Jul 19", "Aug 19", "Sep 19", "Oct 19"],
                majorGridLines: {
                    visible: false
                },
                labels: {
                    rotation: "auto"
                }
            },
            tooltip: {
                visible: true,
                format: "{0}%",
                template: "#= series.name #: #= value #"
            }
        });
    }

    $(document).ready(createChart);
    $(document).bind("kendo:skinChange", createChart);
</script>

有关面积图的一些文档 https://demos.telerik.com/kendo-ui/area-charts/索引

some documentation about area charts https://demos.telerik.com/kendo-ui/area-charts/index

这篇关于KendoUI中的向下钻取图表可行性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆