1

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}           
    }))   

) Only the statement:

.Theme(Response.Cookies.Theme())

invoked an error, but I removed the line, since I need to get started first.

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>

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…

tereško
  • 58,060
  • 25
  • 98
  • 150

1 Answers1

1

I think what you are looking for is the common _Layout.cshtml

Should be located in the Views\Shared folder.

You can learn more about how views are structured and work on the ASP.net website.

Josh
  • 44,706
  • 7
  • 102
  • 124