引用Shield UI ASP.NET MVC javascript模块 [英] Referencing the Shield UI ASP.NET MVC javascript modules
问题描述
我正在创建一个MVC ASP.NET项目,并且正在使用Shield UI MVC图表.我添加了对我下载的试用版软件包的引用,并插入了在线提供的示例演示代码:
I am creating an MVC ASP.NET project and am using Shield UI MVC chart. I have added references to the trial packages I downloaded and have inserted the sample demo code that is available online: https://demos.shieldui.com/mvc/pie-chart/basic-usage
@(Html.ShieldChart()
.Name("chart")
.Theme(Response.Cookies.Theme())
.Export(false)
.PrimaryHeader(header => header.Text("Browsers Popularity amongst Users"))
.ChartLegend(legend=>legend.Enabled(true))
.SeriesSettings(setting=>setting.Pie(pie=>pie
.EnablePointSelection(true)))
.Tooltip(tooltip=>tooltip.CustomPointText("{point.collectionAlias}: {point.y}"))
.DataSeries(dataSeries => dataSeries.Pie()
.CollectionAlias("Usage")
.Data(new object[]
{
new object[] {"Firefox", 44.2},
new object[] {"IE7", 26.6},
new object[] {"IE6", 20},
new object[] {"Chrome", 3.1},
new object[] {"Other", 5.4}
}))
) 仅声明:
.Theme(Response.Cookies.Theme())
调用了一个错误,但是我删除了该行,因为我需要先开始.
invoked an error, but I removed the line, since I need to get started first.
由于我是MVC的新手,所以我不知道可以在哪里放置以下代码行:
Since I am quite new to MVC I can’t figure out where I could place the following lines of code:
<head >
<link rel="stylesheet" type="text/css" href="css/shieldchart.css" />
<script src="js/jquery-1.9.1.min.js" type="text/javascript">//</script>
<script src="js/shield-chart.all.min.js" type="text/javascript">//</script>
</head>
因为我找不到合适的地方.我在项目中有Index.cshtml和About.cshtm文件,但是没有可以放置这些行的元素……
since I see nowhere a suitable place. I have Index.cshtml and About.cshtm files in the project, however there is no element I could place the lines…
推荐答案
我认为您正在寻找的是常见的_Layout.cshtml
I think what you are looking for is the common _Layout.cshtml
应位于Views\Shared
文件夹中.
您可以在 ASP.net网站上详细了解视图的结构和工作方式. >.
You can learn more about how views are structured and work on the ASP.net website.
这篇关于引用Shield UI ASP.NET MVC javascript模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!