标签:item asi pixel bsp view ams += ram span
{ title: { text: ‘请求返回码分布‘, subtext: ‘实时数据‘ }, tooltip: { trigger: ‘axis‘, position: function (point, params, dom, rect, size) {//固定在顶部 return [point[0], ‘10%‘]; }, formatter: "发生时间:{b}<br/>返回码:{a}<br/>数量(个):{c}",//<br/>错误描述:{d} // formatter: function (params, ticket, callback) { // // console.log(params,666) // let htmlStr = ‘‘; // for (let i = 0; i < params.length; i++) { // let param = params[i]; // let xName = param.name;//x轴的名称 // let seriesName = param.seriesName;//图例名称 // let value = param.value;//y轴值 // let color = param.color;//图例颜色 // if (i === 0) { // const errorCode = params[0].name.split("/"); // const errorCodeName = errorCode[1]; // const errorCodeTime = errorCode[0]; // htmlStr += ‘错误编码:‘+errorCodeName + ‘<br/>‘; // htmlStr += ‘发生时间:‘+errorCodeTime + ‘<br/>‘; // } // htmlStr += ‘<div>‘; // //为了保证和原来的效果一样,这里自己实现了一个点的效果 // htmlStr += ‘<span style="margin-right:5px;display:inline-block;width:10px;height:10px;border-radius:5px;background-color:‘ + color + ‘;"></span>‘; // //圆点后面显示的文本 // htmlStr += ‘数量(个):‘+ value ; // htmlStr += ‘</div>‘; // } // return htmlStr; // } }, legend: { data: [],//"请求错误码" }, toolbox: { itemSize: 20, right: "2%", feature: { mark: {show: false}, dataView: {show: false, readOnly: false,}, magicType: {show: false, type: [‘line‘, ‘bar‘]}, restore: {show: false}, saveAsImage: {show: true, pixelRatio: 2}, dataZoom : { yAxisIndex : "none" //不启用y轴的选中 } } }, calculable: true, xAxis: [ { type: ‘category‘, data: [] }, ], yAxis: [ { type: ‘value‘, axisLabel: { formatter: ‘{value}‘ } }, ], series: [ // { // name: "",//请求错误码 // type: ‘line‘, // data: [], ] };
标签:item asi pixel bsp view ams += ram span
原文地址:https://www.cnblogs.com/wheatCatcher/p/10472322.html