鍍金池/ 問答/HTML/ echarts柱狀圖表標題的位置豎立在Y軸上?

echarts柱狀圖表標題的位置豎立在Y軸上?

自己做的,第一個是我自己做的, 想要把標題改成第二的樣式, 在線等, 比較急, 求幫忙

clipboard.png
怎么把Y軸的標題往左邊調(diào)一點點
clipboard.png

想要移動的位置

clipboard.png
js

            let option = {
              color: ["#003366", "#006699", "#4cabce", "#e5323e"],
              title: {
                show: true,
                text: "電導率us/cm",
                // padding: [10],
                textStyle: {
                  fontWeight: "normal",
                  color: "#fff", // 標題顏色
                  fontSize: 14,
                },
                left: "center"
              },
              tooltip: {
                trigger: "axis",
                // 鼠標移動柱狀圖是提示文字
                show: true,
                axisPointer: {
                  type: "shadow"
                }
              },
              legend: {
                data: legend,
                textStyle: {
                  color: "#fff"
                }
              },
              toolbox: {
                show: true,
                orient: "vertical",
                left: "right",
                top: "center",
                feature: {
                  mark: {
                    show: true
                  },
                  dataView: {
                    show: true,
                    readOnly: false
                  },
                  magicType: {
                    show: true,
                    type: ["line", "bar", "stack", "tiled"]
                  },
                  restore: {
                    show: true
                  },
                  saveAsImage: {
                    show: true
                  }
                }
              },
              calculable: true,
              xAxis: [
                {
                  type: "category",
                  axisLabel: {
                    show: true,
                    textStyle: {
                      color: "#fff"
                    }
                  },
                  axisLine: {
                    lineStyle: {
                      color: "#fff"
                    }
                  },
                  axisTick: {
                    show: false
                  },
                  data: names
                }
              ],
              yAxis: [
                {
                  type: "value",
                  axisLine: {
                    lineStyle: {
                      color: "#fff"
                    }
                  },
                  splitLine: {
                    lineStyle: {
                      color: ["#fff"]
                    }
                  }
                }
              ],
              series: solumList
            };
回答
編輯回答
小眼睛

參考百度api 配置

2018年3月14日 02:25
編輯回答
陌璃

感覺用yAxisname合理一點 設置nameLocation:'center'

 yAxis: [
    {
        type: 'value',
        name: '電導率us/cm',
        nameLocation:'center',
        nameGap: 30,//與軸線間距
        nameTextStyle:{ //文字樣式
          color: .
          fontSize: ..
          ...
        },
    },
]
2018年6月29日 05:13
編輯回答
擱淺

文檔中有個 grid 屬性 你設置一下就好了

2018年2月21日 13:20
編輯回答
孤巷

是要把第一張圖的文字移動到第二張圖的位置么?

2017年8月9日 23:21