echarts总结

来源:互联网 发布:淘宝网顾老师太极鞋 编辑:程序博客网 时间:2024/05/18 03:55

快速入门:

http://echarts.baidu.com/tutorial.html#5%20%E5%88%86%E9%92%9F%E4%B8%8A%E6%89%8B%20ECharts


下面是一个自己开发的例子


Map<String, Object> echartMap = new LinkedHashMap<String, Object>();Map<Object, Object> titleMap = new HashMap<>();titleMap.put("text", channel==null||"".equals(channel)?"":"渠道:"+channel);echartMap.put("title", titleMap);Map<String, Object> trigerMap = new HashMap<String, Object>();trigerMap.put("trigger", "axis");echartMap.put("tooltip", trigerMap);Map<Object, Object> legendMap = new HashMap<>();legendMap.put("left", 180);legendMap.put("selectedMode",false);//禁止选择图例legendMap.put("data", echart_legend);legendMap.put("right", 40);//legendMap.put("top", 50);echartMap.put("legend", legendMap);Map<String, Object> gridMap = new HashMap<String, Object>();gridMap.put("left", "3%");gridMap.put("right", "3%");gridMap.put("bottom", "3%");gridMap.put("containLabel", "true");echartMap.put("grid",gridMap);Map<Object, Object> toolboxMap =  new HashMap<>();Map<Object, Object> featureMap = new HashMap<>();Map<Object, Object> emptyMap = new HashMap<Object, Object>();featureMap.put("saveAsImage", emptyMap);featureMap.put("dataView", emptyMap);Map<String, Object> magicTypeMap = new HashMap<String, Object>();List<Object> magicType = new ArrayList<Object>();//magicType.add("stack");//平铺//magicType.add("tiled");//堆叠magicType.add("line");//折线图magicType.add("bar");//柱状图magicTypeMap.put("type", magicType);featureMap.put("magicType", magicTypeMap);toolboxMap.put("feature", featureMap);echartMap.put("toolbox",toolboxMap);


0 0
原创粉丝点击