数据可视Echart折线图

一、前言

  Echart简介:一个使用 JavaScript 实现的开源可视化库,作为国内的IT三巨头之一的百度的推出一款相对较为成功的开源项目。

优势:1、使用简单,2、echarts.js支持按需求打包,3、开源     .....

学习方法:

看Echart官网范例,关键点是后端构造前端需要的数据格式,一般需要数值数组和栏目数组

二、简单应用

前端

后端数据构造


@Controller
public class Assert_InvestController {
    @Resource
    AC_InvestService ac_investService;

    @RequestMapping(value = "/Invest_countserver.do")
    public void Invest_countController(HttpServletRequest request, HttpServletResponse response) throws IOException {
        request.setCharacterEncoding("UTF-8");
        response.setCharacterEncoding("UTF-8");
        JSONObject json = new JSONObject();
        List Aclist=new ArrayList();
        List Catelist=new ArrayList();
        List list=ac_investService.getAC_Invest();
        for(int i=0;i

结果视图

数据可视Echart折线图_第1张图片

你可能感兴趣的:(数据可视化)