我有一个JSON文件,我希望通过cshtml
填充BarChart。
JSON文件:
[{
"Subject": "TEST APP",
"AppScores": [{
"Season": "AAAAAAAAAAAAAAAAAAAA",
"year": "1",
"value": "44"
}, {
"Season": "BBBBBBBBBBBBBBBBBBBBB",
"year": "2",
"value": "29"
}]
}, {
"Subject": "TEST APP2",
"AppScores": [{
"Season": "CCCCCCCCCCC",
"year": "3",
"value": "15"
}, {
"Season": "DDDDDDDDDDDDDDDDD",
"year": "4",
"value": "32"
}]
}]
我的cshtml
文件中的代码:
<script type="text/javascript">
var myChart = new JSChart('chartid', 'bar');
myChart.setDataJSON('data2.json');
myChart.draw();
</script>
我的data2.json
文件与cshtml file
位于同一目录中。
谁能看到我在这里缺少的东西?