Kendo ui 图表组件未使用Kendo UI Asp.net mvc core显示
我目前正在尝试评估剑道UI asp.NETMVC6(“asp.NETCore”)小部件。我下载了示例项目Kendo.Mvc.Examples项目,可以在这里找到: 示例项目工作得很好。现在,我尝试创建自己的骨架项目,如下所示:Kendo ui 图表组件未使用Kendo UI Asp.net mvc core显示,kendo-ui,kendo-asp.net-mvc,kendo-chart,Kendo Ui,Kendo Asp.net Mvc,Kendo Chart,我目前正在尝试评估剑道UI asp.NETMVC6(“asp.NETCore”)小部件。我下载了示例项目Kendo.Mvc.Examples项目,可以在这里找到: 示例项目工作得很好。现在,我尝试创建自己的骨架项目,如下所示: 使用ASP.NET 5 Web应用程序模板创建了新的Visual Studio项目 在我的项目json中添加了“Kendo.Mvc”:“2016.1.301”依赖项 添加了services.AddKendo()在Startup.ConfigureServices()中 修
“Kendo.Mvc”:“2016.1.301”
依赖项services.AddKendo()代码>在Startup.ConfigureServices()中
jQuery(function(){jQuery(#chart”).kendoChart({“categoryAxis”:[{“categories”:[“2002”、“2003”、“2004”、“2005”、“2006”、“2007”、“2008”、“2009”、“2010”、“2011”],“majorGridLines”:{“visible”:false}],“chartArea”:{“background”:“transparent”},“legend”:{“position”:“bottom”},“series”:[{“name”:“India”,“type”:“area”,“data”:[3.89,8.38,8.38,8.38,9.89,8.2389,9.552,6.855 5)7,{,{,{,{,{“姓名”世界,7.907,7.907,7.907,7.907,7.907,7.907,7.907 7,7.9.9 7 7 7 7 7 7 7,,{,{,{,[姓名:,9.9.9,9.9,9,9,9.9,9.9.9,9,9,9.552.9,9.552,9,9.552,9,9.552,9.552,9,6.5,9,9,9,6.552,6.5 5,6.5,6.5,6.5,6.5,6.5,6.5,6.5,6.5,6.5,6.5 5,6.5 5 5 5{“文本”:“国内生产总值增长\n/GDP年增长率%/”},“工具提示”:{“格式:{0}%,“模板:{0}%,“模板:{0}%,”行:{“可见”:假},“类型:{numeric”}],”系列默认值:{“区域:{”行:{“线条:{”样式:{平滑”}}});
不确定我做错了什么…感谢您的帮助!OK通过以下Telerik疑难解答链接解决了问题: 在页面中的剑道ui脚本之后引用了jquery。请确保在剑道ui之前包含jquery
<div id="chart" name="chart"></div><script>jQuery(function(){jQuery("#chart").kendoChart({"categoryAxis":[{"categories":["2002","2003","2004","2005","2006","2007","2008","2009","2010","2011"],"majorGridLines":{"visible":false}}],"chartArea":{"background":"transparent"},"legend":{"position":"bottom"},"series":[{"name":"India","type":"area","data":[3.907,7.943,7.848,9.284,9.263,9.801,3.89,8.238,9.552,6.855]},{"name":"World","type":"area","data":[1.988,2.733,3.994,3.464,4.001,3.939,1.333,-2.245,4.339,2.727]},{"name":"Haiti","type":"area","data":[-0.253,0.362,-3.519,1.799,2.252,3.343,0.843,2.877,-5.416,5.59]}],"title":{"text":"Gross domestic product growth \n /GDP annual %/"},"tooltip":{"format":"{0}%","template":"#= series.name #: #= value #","visible":true},"valueAxis":[{"axisCrossingValue":[-10],"labels":{"format":"{0}%"},"line":{"visible":false},"type":"numeric"}],"seriesDefaults":{"area":{"line":{"style":"smooth"}}}});});</script>