king
2020-05-29 f9f3fe537fadd3a5a77895d41e5e4a8862d7aa17
src/tabviews/zshare/chartcomponent/index.jsx
@@ -181,8 +181,8 @@
      _data = [..._mdata.values()]
    }
    if (plot.correction && plot.chartType === 'bar' && plot.enabled !== 'true' && _data.length > 0 && _data.length < plot.correction) {
      if (plot.customs && plot.customs.filter(cell => cell.chartType !== 'bar').length === 0) {
    if (plot.correction && plot.chartType === 'bar' && _data.length > 0 && _data.length < plot.correction) {
      if (plot.enabled !== 'true' || (plot.customs && plot.customs.filter(cell => cell.chartType !== 'bar').length === 0)) {
        let _num = plot.correction - _data.length
        for (let i = 0; i < _num; i++) {
          let _val = Array( i + 2 ).join(' ')
@@ -429,6 +429,18 @@
      nice: true
    })
    // 坐标轴格式化
    chart.axis(plot.Xaxis, {
      label: {
        formatter: (val) => {
          if (!val || /^\s*$/.test(val)) return val
          let _val = `${val}`
          if (_val.length <= 10) return val
          return _val.substring(0, 5) + '...'
        }
      }
    })
    if (!plot.legend || plot.legend === 'hidden') {
      chart.legend(false)
    } else {
@@ -540,6 +552,18 @@
        range: [0.05, 0.95]
      })
    }
    // 坐标轴格式化
    chart.axis(plot.Xaxis, {
      label: {
        formatter: (val) => {
          if (!val || /^\s*$/.test(val)) return val
          let _val = `${val}`
          if (_val.length <= 10) return val
          return _val.substring(0, 5) + '...'
        }
      }
    })
    if (!plot.legend || plot.legend === 'hidden') {
      chart.legend(false)
@@ -693,6 +717,18 @@
      nice: true
    })
    // 坐标轴格式化
    chart.axis(plot.Xaxis, {
      label: {
        formatter: (val) => {
          if (!val || /^\s*$/.test(val)) return val
          let _val = `${val}`
          if (_val.length <= 10) return val
          return _val.substring(0, 5) + '...'
        }
      }
    })
    if (!plot.legend || plot.legend === 'hidden') {
      chart.legend(false)
    } else {