【问题标题】:MVC Shield Chart wont ShowMVC Shield Chart 不会显示
【发布时间】:2015-01-05 09:28:11
【问题描述】:

我正在尝试将 MVC Shield 图表添加到我当前正在运行的页面中。 当我这样做时,页面仍在工作,但图表没有显示。就像代码根本不存在一样。

代码:

@using Shield.Mvc.UI;
@(Html.ShieldChart()
.Name("chart")
.Theme("light")
.AxisX(axis => axis
    .Title(title => title.Text("Budget"))
    .EndOffset(0.05f)
    .StartOffset(0.05f))
.AxisY(axis => axis
    .Title(title => title.Text("Revenue")))
.PrimaryHeader(header => header
    .Text("Ad Budget VS Revenue"))
 .ChartLegend(legend => legend
    .Align(Shield.Mvc.UI.Chart.Align.Center)
    .VerticalAlign(Shield.Mvc.UI.Chart.VerticalAlign.Top)
    .RenderDirection(Shield.Mvc.UI.Chart.Direction.Horizontal))
 .DataSeries(series => series
    .Bubble()
    .Name("TV Commercials")
    .Data(new object[]
    {
        new { x = 100000, y = 112000, size = 112000, pointName = "Poor" },
        new { x = 120000, y = 140000, size = 140000, pointName = "Low" },
        new { x = 140000, y = 200000, size = 200000, pointName = "Average" },
        new { x = 160000, y = 210000, size = 210000, pointName = "Good" },
        new { x = 180000, y = 217000, size = 217000, pointName = "Superb" }
    }))
.DataSeries(series => series
    .Bubble()
    .Name("Internet Advertising")
    .Data(new object[]
    {
        new { x = 100000, y = 90000, size = 90000, pointName = "Poor Performance" },
        new { x = 120000, y = 97000, size = 97000, pointName = "Low Performance" },
        new { x = 140000, y = 140000, size = 140000, pointName = "Average Performance" },
        new { x = 160000, y = 300000, size = 300000, pointName = "High Performance" },
        new { x = 180000, y = 400000, size = 400000, pointName = "Ideal Performance" }
    }))

)`

【问题讨论】:

    标签: asp.net-mvc razor shieldui


    【解决方案1】:

    您是否已将更改添加到您的 ~/Views/Web.config 文件并包含 ShieldUI 的 JavaScript 和 CSS 资源,如下页所述:

    https://www.shieldui.com/documentation/aspnet.mvc.chart/quickstart

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多