Chart.js 未显示在 Visual Studio 中。它没有执行

Chart.js is not displaying in Visual Studio. it is not executing

Chart.js 未显示在 visual studio 中。不是 运行 不知道为什么。 我已经用 sublime,记事本检查过,它工作正常。但在 Visual Studio asp.net 平台中它不起作用。

<!DOCTYPE HTML>
<html>
<head>
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script type="text/javascript">

window.onload = function () {
    var chart = new CanvasJS.Chart("chartContainer", {
        theme: "theme2",//theme1
        title:{
            text: "Basic Column Chart - CanvasJS"              
        },
        animationEnabled: false,   // change to true
        data: [              
        {
            // Change type to "bar", "area", "spline", "pie",etc.
            type: "column",
            dataPoints: [
                { label: "apple",  y: 10  },
                { label: "orange", y: 15  },
                { label: "banana", y: 25  },
                { label: "mango",  y: 30  },
                { label: "grape",  y: 28  }
            ]
        }
        ]
    });
    chart.render();
}
</script>
</head>
<body>
<div id="chartContainer" style="height: 300px; width: 100%;"></div>
</body>
</html>

请参考 Tutorials on adding Charts into ASP.NET MVC Applications 在您的 ASP .Net 应用程序中集成 CanvasJS 图表。