smartClient封装Echarts

具体使用代码如下:

var charts = isc.M3Echarts.create({
		width: "100%",
		height: "100%",
		title: chartTitle, 		//图左上角显示的文字,默认""
		subtext: chartSubtext, 	//图左上角title下方显示的文字,默认""
		backgroundColor: "white", //图的底色
		showValue: showValue, //是否显示值
		isColumnLine: isColumnLine, //是否柱线图
		isComparisonChart: isComparisonChart, //是否对比图
		isBiaxial: isBiaxial,				//是否双轴图
		isPie: isPie,						//是否饼图
		isColumn: isColumn,					//是否柱图
		isLine: false,
		markLine: markLine,				//是否显示虚线列
		lineData: lineData,				//线柱图线数据取数列
		comparisonData: comparisonData, //对比的基数列
		yLAxisName: yLAxisName,
		yLAxisFormatter: yLAxisFormatter, //左边Y轴数据显示格式化
		yRAxisName: yRAxisName, 		//右边Y轴显示名,默认""
		yRAxisFormatter: yRAxisFormatter, //右边Y轴数据显示格式化
		dataZoomBase: dataZoomBase,		//图最多一次出祭祖
		// border: "1px solid black",	//加入边框
		isXOrY:isXOrY,					//取左边轴还是取右边轴,true为取右边轴
		scale:scale,					//坐标轴是否自定义最大最小值
		splitNumber:splitNumber,		//坐标轴分割数
		yAxismax:yAxismax,				//最大值
		yAxismin:yAxismin,				//最小值
		radius:[30,20],
		isSum:isSum,
		dataZoom: {
			show: true
		},
		toolbox: {
			show: true,
			orient: "vertical",
			x: "right",
			y: "top",
			dataViewShow: true,
			magicTypeShow: true,
			restoreShow: true,
			saveAsImageShow: false,
			customToolOneShow: true,
			customToolOneTitle: "保存图片",
			customToolOneIcon: "",
			customToolOneClick: function(chart) {
				var img = isc.Img.create({
					width: "100%",
					height: "100%",
					imageType: "stretch",
					src: chart.myChart.getDataURL("jpeg")
				})
				var w = isc.Window.create({
					width: "100%",
					height: "100%",
					title: "保存图片",
					showMinimizeButton: false,
					showCloseButton: true,
					showTitle: true,
					showHeader: true,
					autoCenter: true,
					isModal: true,
					showModalMask: true,
					items: [img]
				});
				w.show();
			}
		},
		data: data,
		chartSingleClick: function(param) {
			if (typeof(chartSingleClick) == "function") {
				chartSingleClick(param,charts)
			}
		},
		chartDoubleClick: function(param) {
			// 双击事件
			if (typeof(chartDoubleClick) == "function") {
				chartDoubleClick(param,charts)
			}
		}
	});
</pre><pre name="code" class="javascript">效果图如下:
<img src="https://img-blog.csdn.net/20161024170525378?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
<img src="https://img-blog.csdn.net/20161024170739847" alt="" />

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值