簡體   English   中英

引用Shield UI ASP.NET MVC javascript模塊

[英]Referencing the Shield UI ASP.NET MVC javascript modules

我正在創建一個MVC ASP.NET項目,並且正在使用Shield UI MVC圖表。 我添加了對我下載的試用版軟件包的引用,並插入了在線提供的示例演示代碼: 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())

調用了一個錯誤,但是我刪除了該行,因為我需要先開始。

由於我是MVC的新手,所以我不知道可以在哪里放置以下代碼行:

<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文件,但是沒有可以放置這些行的元素…

我認為您正在尋找的是常見的_Layout.cshtml

應該位於Views\\Shared文件夾中。

您可以在ASP.net網站上了解有關視圖的結構和工作方式的更多信息

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM