javascript - Use Json to Populate Chart with HTML -


i have json file populate barchart through cshtml.

json file:

[{     "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"     }] }] 

the code within cshtml file:

<script type="text/javascript">     var mychart = new jschart('chartid', 'bar');     mychart.setdatajson('data2.json');     mychart.draw(); </script> 

my data2.json file located within same directory cshtml file.

can see missing here?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -