New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

series[i]-pie.legendHoverLink 設置為false,無效 #8010

Closed
jaelys opened this Issue Mar 23, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jaelys

jaelys commented Mar 23, 2018

One-line summary [问题简述]

series[i]-bar.legendHoverLink 設置為false,有效
series[i]-pie.legendHoverLink 設置為false,無效

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:4.04
  • Browser version [浏览器类型和版本]:Chorme 65.0.3325.181 (正式版本) (64 位元)
  • OS Version [操作系统类型和版本]: Windows 10

Expected behaviour [期望结果]

series[i]-pie.legendHoverLink 設置為false,有效

ECharts option [ECharts配置项]

option = {
     backgroundColor: {
    type: "linear",
    x: 0,
    y: 0,
    x2: 0,
    y2: 1,
    colorStops: [
      {
        offset: 0,
        color: "rgba(0,0,0,0.3)" // 0% 处的颜色
      },
      {
        offset: 0.5,
        color: "rgba(0,0,0,0.1)" // 0% 处的颜色
      },
      {
        offset: 1,
        color: "rgba(0,0,0,0.3)" // 100% 处的颜色
      }
    ],
    globalCoord: false // 缺省为 false
  },
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "shadow"
    }
  },
  legend: {
    data: ["次數", "累計"]
  },
  toolbox: {
    show: true,
    feature: {
      saveAsImage: {
        title: "另存圖片"
      }
    }
  },
  xAxis: {
    type: "log",
    name: "",
    offset: 0,
    axisLabel: {
      formatter: (value, index) => {
        var hr = Math.floor(value / 3600);
        var min = Math.floor((value - hr * 3600) / 60);
        var sec = parseInt(value - hr * 3600 - min * 60);
        while (min.length < 2) {
          min = "0" + min;
        }
        while (sec.length < 2) {
          sec = "0" + min;
        }
        if (hr) hr += ":";
        return hr + min + ":" + sec;
      }
    },
    axisTick: {
      lineStyle:{
        color:"rgba(255,255,255,0.2)",
        type:"dotted"
      },
      alignWithLabel: true
    },
    axisLine:{
      lineStyle:{
        color:"rgba(255,255,255,0.2)"
      }
    },
    splitLine:{
      show:false
    }
  },
  yAxis: {
    type: "category",
    boundaryGap: true,
    inverse: true,
    scale: true,
    axisTick: {
      lineStyle:{
        color:"rgba(255,255,255,0.2)",
        type:"dotted"
      },
      alignWithLabel: true
    },
    axisLabel: {
      /* formatter: (value, index) => {
          return "{" + index + "|" + value + "}";
        }, */
      margin: 20      
    },
    axisLine:{
      lineStyle:{
        color:"rgba(255,255,255,0.2)"
      }
    },
    data: [
      "挑人",
      "計時器",
      "記分板",
      "即問即答",
      "重複作答",
      "統計圖",
      "翻牌",
      "搶權",
      "推送",
      "飛遞",
      "作品比較"
    ]
  },
  grid: [
    {
      top: 50,
      width: "50%",
      //bottom: '45%',
      left: 20,
      containLabel: true
    },
    {
      top: 300,
      width: "50%",
      bottom: 0,
      left: 10,
      containLabel: true
    }
  ],
  series: [
    {
      name: "次數",
      type: "bar",
      data: [5, 3, 7, 7, 2, 5, 1, 4, 4, 1, 4],
      label: seriesLabel,
      itemStyle:{
        color:"rgba(184,241,237,1)",
        opacity:8
      }
    },
    {
      name: "累計",
      type: "bar",
      barGap: "0%",
      itemStyle:{
        color:"rgba(152,75,75,1)",
        opacity:8
      },
      label: {
        normal: {
          formatter: x => {
            var hr = Math.floor(x.value / 3600);
            var min = Math.floor((x.value - hr * 3600) / 60);
            var sec = parseInt(x.value - hr * 3600 - min * 60);

            while (min.length < 2) {
              min = "0" + min;
            }
            while (sec.length < 2) {
              sec = "0" + min;
            }
            if (hr) hr += ":";
            return hr + min + ":" + sec;
          },
          show: true,
          textBorderColor: "#333",
          textBorderWidth: 2
        }
      },
      data: [null, 367, 20, 119, 30, 56, 23, 270, 26, 51, null]
    },
    {
      name: "次數",
      type: "pie",
      legendHoverLink:false,
      radius: ["15%", "30%"],
      center: ["75%", "30%"],
      avoidLabelOverlap: false,
      label: {
        normal: {
          show: false,
          formatter: "{b} {d}%",
          position: "center"
        },
        emphasis: {
          show: true,
          textStyle: {
            fontSize: "28",
            fontWeight: "bold"
          }
        }
      },
      /* labelLine: {
          normal: {
            show: true,
            smooth: true
          }
        }, */
      data: [
        { value: 5, name: "挑人" },
        { value: 3, name: "計時器" },
        { value: 7, name: "記分板" },
        { value: 7, name: "即問即答" },
        { value: 2, name: "重複作答" },
        { value: 5, name: "統計圖" },
        { value: 1, name: "翻牌" },
        { value: 4, name: "搶權" },
        { value: 4, name: "推送" },
        { value: 1, name: "飛遞" },
        { value: 4, name: "作品比較" }
      ]
    },
    {
      name: "累計",
      type: "pie",
      legendHoverLink:false,
      radius: ["15%", "30%"],
      center: ["75%", "70%"],
      avoidLabelOverlap: false,
      label: {
        normal: {
          show: false,
          formatter: "{b} {d}%",
          position: "center"
        },
        emphasis: {
          show: true,
          textStyle: {
            fontSize: "28",
            fontWeight: "bold"
          }
        }
      },
      /* labelLine: {
          normal: {
            show: true,
            smooth: true
          }
        }, */
      data: [
        { value: 0, name: "挑人" },
        { value: 367, name: "計時器" },
        { value: 20, name: "記分板" },
        { value: 119, name: "即問即答" },
        { value: 30, name: "重複作答" },
        { value: 56, name: "統計圖" },
        { value: 23, name: "翻牌" },
        { value: 270, name: "搶權" },
        { value: 26, name: "推送" },
        { value: 51, name: "飛遞" },
        { value: 0, name: "作品比較" }
      ]
    },
    {
      name: "次數",
      type: "pie",
      radius: ["0%", "10%"],
      center: ["75%", "30%"],
      avoidLabelOverlap: false,
      labelLine: {
          normal: {
            show: false            
          }
        }, 
        data: [{ value:100, name: "",itemStyle:{color:"rgba(184,241,237,1)"} }]
    },
    {
      name: "累計",
      type: "pie",
      radius: ["0%", "10%"],
      center: ["75%", "70%"],
      avoidLabelOverlap: false,
      labelLine: {
          normal: {
            show: false            
          }
        }, 
      data: [{ value:100, name: "",itemStyle:{color:"rgba(152,75,75,1)"} }]
    }
  ]
}

Other comments [其他信息]

@100pah 100pah closed this in 22b09aa Mar 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment