echarts总结

快速入门:

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);
			



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值