0

知道如何使用 Telerik Kendo UI DataViz 将图表添加到 iPhone Web 应用程序。提前致谢。这是我想要做的,但图表没有出现!

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
    <script src="../../../../Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="../../../../Scripts/kendo.all.js" type="text/javascript"></script>
    <script src="../../../../Scripts/console.js" type="text/javascript"></script>
    <link href="../../../../Content/Mobile/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="../../../../Content/Mobile/kendo.mobile.all.min.css" rel="stylesheet"
        type="text/css" />

    <div data-role="view" data-title="Views">
    <header data-role="header">
        <div data-role="navbar">
            <span data-role="view-title"></span>
            <a data-align="right" data-role="button" class="nav-button" href="#index">Index</a>
        </div>
    </header>
    <ul data-role="listview" data-style="inset">
        <li><a href="#secondview">Local View</a></li>
    </ul>
    <ul data-role="listview" data-style="inset">
        <li><a href="../../content/mobile/view/remoteview.html">Remote View</a></li>
    </ul>
</div>

<div data-role="view" id="secondview" data-layout="mobile-view" data-title="Local View">
  <div id="chart">
        </div>
        <script>
            function createChart() {
                $("#chart").kendoChart({
                    title: {
                        text: "Kendo Chart Example"
                    },
                    series: [
         { name: "Example Series", data: [200, 450, 300, 125] }
    ]
                });
            }

            $(document).ready(function () {
                setTimeout(function () {

                    createChart();

                    $("#example").bind("kendo:skinChange", function (e) {
                        createChart();
                    });
                }, 400);
            });
        </script>
</div>

<div data-role="layout" data-id="mobile-view">
    <header data-role="header">
        <div data-role="navbar">
            <a class="nav-button" data-align="left" data-role="backbutton">Back</a>
            <span data-role="view-title"></span>
            <a data-align="right" data-role="button" class="nav-button" href="#index">Index</a>
        </div>
    </header>
</div>


    <script>
        window.kendoMobileApplication = new kendo.mobile.Application(document.body);
    </script>

提前致谢

4

1 回答 1

0

KendoUI DataViz 组件在基于 Webkit 的移动浏览器中工作,包括 iOS 上的 Safari(源代码),以及 Android Browser v3 及更高版本。

如果您只想知道如何实现 KendoUI 图表,这是我回答另一个问题的一个简单问题,关于如何强制 KendoUI 绘制缺失值:http: //jsfiddle.net/LyndsySimon/KJuDe/

categoryAxis: {
    categories: [
        'test<tspan dx="-20px" dy="1em">label</tspan>', 2006, 2007, 2008, 2009]
}

您可以在 KendoUI 的网站上找到对 DataViz 库的完整参考:http ://www.kendoui.c​​om/documentation/dataviz/chart/overview.aspx

于 2012-04-19T14:33:19.860 回答