|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
/*
|
|
|
|
|
* @Author: your name
|
|
|
|
|
* @Date: 2021-10-08 10:13:32
|
|
|
|
|
* @LastEditTime: 2021-11-18 11:29:41
|
|
|
|
|
* @LastEditTime: 2021-11-19 17:57:49
|
|
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
|
|
* @Description: In User Settings Edit
|
|
|
|
|
* @FilePath: /data-show/src/utils/gol/index.js
|
|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
import * as echarts from "echarts";
|
|
|
|
|
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
|
|
|
|
// import {doStr} from "./dataTool"
|
|
|
|
|
export function createSingleColumnar(dx=[], ds=[], color='#3373CC') {
|
|
|
|
|
export function createSingleColumnar(dx=[], ds=[], color='#3373CC', n = 4) {
|
|
|
|
|
return {
|
|
|
|
|
grid: {
|
|
|
|
|
top: 20,
|
|
|
|
@ -41,10 +41,11 @@ export function createSingleColumnar(dx=[], ds=[], color='#3373CC') {
|
|
|
|
|
type: "category",
|
|
|
|
|
axisLabel :{
|
|
|
|
|
interval:0,
|
|
|
|
|
with: 1 / dx.length * 100 + '%',
|
|
|
|
|
overflow: 'truncate',
|
|
|
|
|
ellipsis: '...'
|
|
|
|
|
formatter: function (value) {
|
|
|
|
|
return (value.length > n ? (value.slice(0,n)+"...") : value )
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
triggerEvent: false,
|
|
|
|
|
axisTick: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
@ -109,7 +110,7 @@ export function createSingleColumnar(dx=[], ds=[], color='#3373CC') {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
offset: 1,
|
|
|
|
|
color: color, // 100% 处的颜色#3373CC
|
|
|
|
|
color: color ? color : '#3373CC', // 100% 处的颜色#3373CC
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
false
|
|
|
|
|