smartClient封装Echarts

来源:互联网 发布:恶搞非诚勿扰灭灯软件 编辑:程序博客网 时间:2024/06/15 11:17

具体使用代码如下:

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="http://img.blog.csdn.net/20161024170525378?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
<img src="http://img.blog.csdn.net/20161024170739847" alt="" />

0 0
原创粉丝点击