How to display the JQPLOT graph rather a long text

前端 未结 3 1094
粉色の甜心
粉色の甜心 2021-01-19 15:45

I have a method in controller class which returns JSON data:

public ActionResult ChartDataJSON()
{
    Chart chart = new Chart();
    DataSet ds = dbLayer.Ge         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-19 16:07

    As @user1254053 I also had trouble implementing @Fresh's solution. I was trying to write the js code in my ChartDataJSON view, I mean in the view from the ChartDataJSON() method and I just got plain text objects printed out when running my view.

    Then I tried to write my view code in another view, the index view for example or any other view that just has a return(View) statement and worked out.

    I hope this may help other people and I wish I'm not too late.

提交回复
热议问题