欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql-HighCharts MySql数据库数据绑定

程序员文章站 2022-06-12 18:48:10
...
mysqlhighcharts

前提:已经确定从数据库读出的数据转换为Json格式,测试了下,结果为:
factor Value: {"rows":[{"cur_val":0.1150,"pow_val":26.2913,"consum":76.3807,"voltage":228.6632,"opt_time":"2015-05-26 20:37"},{"cur_val":0.1181,"pow_val":27.0956,"consum":76.3807,"voltage":229.4428,"opt_time":"2015-05-26 20:53"},```]} 数据量有些多 大概有1000多条

Controller:
@ResponseBody
@RequestMapping(value="/factor",method ={RequestMethod.GET,RequestMethod.POST})
public String getFactor(HttpServletRequest request,HttpServletResponse response)throws SgccException{
String factor=null;
System.out.println(request.getParameter("eqid"));
try {
factor=elcDataService.queryData(request.getParameter("acid"), request.getParameter("eqid"));
System.out.print("factor Value: ");
System.out.print(factor);
} catch (Exception e) {
e.printStackTrace();
}
return factor;
}
页面:(大概把相关的贴下)

   

页面显示:mysql-HighCharts MySql数据库数据绑定

但是一直显示不出对应的图表,能否帮看下什么原因?

相关标签: mysql highcharts