echarts暂无数据的表示

echarts暂无数据的表示

徐徐
前端
发布于2023-09-27 23:51:48
🌺前言
echarts暂无数据

javascript
export const useNoDataEcharts = (title = '') => {
  if (!title) {
    return {
      title: {
        text: '暂无数据',
        x: 'center',
        y: 'center',
        textStyle: {
          color: '#9798b4',
          fontWeight: 'normal',
          fontSize: 16,
          fill: '#9798b4'
        }
      }
    }
  }
  return {
    title: {
      text: `${title}`,
      left: 'center',
      top: 10
    },
    graphic: {
      type: 'text',
      left: '49%',
      top: '52%',
      style: {
        text: '暂无数据',
        textAlign: 'center',
        fill: '#9798b4',
        fontSize: 16
      }
    }
  }
}
文章最后更新于 2024-08-17 01:18:36
留言
暂无数据

~~空空如也