2.echarts配置

2.餅圖有顏色部分

series: [  // 數(shù)據(jù)
          {
            name: '訪問來源',
            type: 'pie',
            radius: ['50%', '70%'], // 餅圖有顏色部分
            label: {
              normal: {
                formatter: ''
              }
            },
環(huán)形

3.自定義顯示模塊

series: [
          {
            type: 'pie',
            radius: '65%',
            center: ['50%', '50%'],
            selectedMode: 'single',
            data: [
              {
                value: 1548,
                name: '幽州'
                 label: {  // 自定義顯示模塊
                formatter: [
自定義顯示模塊

4.文字標識部分

顏色的設置
https://blog.csdn.net/qiudechao1/article/details/97628338
position位置
https://blog.csdn.net/qq_34908167/article/details/78500921
文字省略
https://echarts.apache.org/zh/option.html#series-pie.label.formatter
文字始終在echarts內(nèi)
https://segmentfault.com/q/1010000010939022

label: {
              color: "#fff",
              fontSize:14,
              position: 'outer',
              alignTo: 'edge',
              margin: 10,

樣式rich fontSize
https://blog.csdn.net/u010976347/article/details/81390107

rich: {
                  a: {
                    fontSize: 16,
                    fontWeight: 'normal',
                    color: '#fff'
                  }
                },
                textStyle: {
                  fontSize: 20,
                  fontWeight: 600
                }

\n換行

  series: [
          {
            name: '從業(yè)人員性別',
            type: 'pie',
            radius: ['50%', '70%'], // 餅圖有顏色部分
            label: {
              normal: {
                formatter: '\nu0z1t8os',
                textStyle: {
                  fontSize: 16,
                  color: '#fff'
                }
              }
            },
position: ['320', '12'],
series: [
          {
            name: '訪問來源',
            type: 'pie',
            radius: ['50%', '70%'],
            avoidLabelOverlap: false,
            label: { // 文字提示部分
              show: false,
              position: 'center',
              normal: {
                formatter: '%'
              }
            },
文字標識部分

5.鼠標移入

  emphasis: { // 鼠標移入
              label: {
                show: true
                fontSize: '30',
                fontWeight: 'bold'
              }
            },
鼠標移入

6.文字標識移入中間顯示

初始沒有文字標識

   label: { // 文字標識部分
              show: false,
              position: 'center'
            //   normal: {
            //     formatter: ''
            //   }
            },
文字標識移入中間顯示

7.工具欄

  toolbox: {
        show: true,
        feature: {
            mark: {show: true},
            dataView: {show: true, readOnly: false},
            magicType: {
                show: true,
                type: ['pie', 'funnel']
            },
            restore: {show: true},
            saveAsImage: {show: true}
        }
    },
工具欄

8.圖的位置

series: [
          {
            name: '面積模式',
            type: 'pie',
            radius: [30, 110],
            center: ['75%', '50%'], // 圖的位置
            roseType: 'area',
            data: [
圖的位置

9.指示線長度

  labelLine: { // 指示線
              normal: {
                length: 50
              }
            },
            data: [
指示線長度

10.排序

 yAxis: [{
          type: 'category',
          data: ['OPPO R9s', 'OPPO A57', 'OPPO A59s', 'OPPO R9m', 'OPPO A37m', 'vivo X9', 'OPPO A33', 'OPPO R11', 'OPPO A59m', 'vivo X7'],
          inverse: true, // 排序
排序

11.x軸、y軸

xAxis: [{ // x軸
yAxis: [{ // y軸

12.周圍空白部分

https://www.hangge.com/blog/cache/detail_2161.html
坐標溢出

  grid: {
          top: 1,
          left: 20,
          right: 0,
          bottom: 1,
          containLabel: true // 是否包含坐標
        },

13.柱圖寬度

https://blog.csdn.net/qq_38712932/article/details/88406603

14.軸線文字

https://blog.csdn.net/weixin_39090097/article/details/84230699
文字超出隱藏
https://www.imooc.com/article/68144
文字超出換行
https://blog.csdn.net/qq_34817440/article/details/101448194
傾斜
https://blog.csdn.net/xiongdaandxiaomi/article/details/84989059
坐標軸線顏色
https://blog.csdn.net/intelrain/article/details/82599647

axisLabel: { // label文字

15.legend

https://blog.csdn.net/qq_31201781/article/details/89843628

16.去掉刻度線

https://blog.csdn.net/soindy/article/details/72401375

17.堆疊柱形圖

https://blog.csdn.net/yang__k/article/details/88414782

// stack:"1",    // 如果stack一樣就會堆疊
最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

友情鏈接更多精彩內(nèi)容