Skip to content
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

树图自定义symbol在firefox无法正常显示 #12703

Closed
IsKaros opened this issue May 26, 2020 · 4 comments
Closed

树图自定义symbol在firefox无法正常显示 #12703

IsKaros opened this issue May 26, 2020 · 4 comments
Labels

Comments

@IsKaros
Copy link

IsKaros commented May 26, 2020

Version
4.8.0-release

Steps to reproduce
symbol使用的是自定义的本地图片

function setChartOption(data) {
    return {
      series: [
        {
          type: "tree",
          data: [data],
          name: "treeChart",
          top: "1%",
          left: "5%",
          right: "8%",
          bottom: "5%",
          symbol: function (value, params) {
            if (params.data.type == "source") {
               return "image://./../user/image/source.svg";
            } else if (params.data.type == "date") {
              return "image://./../user/image/date.svg";
              // return 'image://./../user/image/date2.svg'
            } else if (params.data.type == "location") {
              return "image://./../user/image/location.svg";
            } else if (params.data.type == "system") {
              return "image://./../user/image/system.svg";
            } else if (params.data.type == "connection") {
              return "image://./../user/image/connection.svg";
            } else if (params.data.type == "events") {
              return "image://./../user/image/event.svg";
            } else if (params.data.type == "evidence") {
              return "image://./../user/image/evidence.svg";
            }

            if (params.data.hasModal == true) {
              return "image://./../user/image/circle.svg";
            } else {
              return "image://./../user/image/empty_circle.svg";
            }
          },
          // symbolSize: 16,
          symbolSize: [32, 32],
          initialTreeDepth: 10,
          // color:'#1b75d3',
          label: {
            position: "inside",
            // verticalAlign: 'bottom',
            align: "center",
            offset: [0, 26],
            color: "#1b75d3",
            padding: 0,
            fontSize: 12,
            formatter: function (params) {
              return params.data.name;
            },
          },

          itemStyle: {
            normal: {
              borderColor: "#1b75d3", //折点颜色
            },
          },
          lineStyle: {
            curveness: "0.4",
          },
          leaves: {
            name: "leaves",
            label: {
              // position: 'center',

              show: true,
              position: "insideBottom",
              verticalAlign: "middle",
              // distance:20,
              align: "center",
              color: "#1b75d3",
              height: 30,
              lineHeight: 20,
              padding: [0, 5],
              offset: [0, 10],
            },
          },
          expandAndCollapse: true,
          animationDuration: 500,
          animationDurationUpdate: 700,
        },
      ],
    };
  }

What is expected?
在firefox下也可以正常显示

What is actually happening?
chrome可以正常显示,firefox无法正常显示自定义symbol,连label文本都消失了

@susiwen8 susiwen8 added the bug label May 26, 2020
@plainheart
Copy link
Member

plainheart commented May 27, 2020

Seems to be related to #12367, it may have nothing to do with browsers.

@IsKaros
Copy link
Author

IsKaros commented May 27, 2020

Seems to be related to #12367, it may have nothing to do with browsers.
你好,chrome可以正常显示,但在firefox使用官方自带的图标也可以正常显示的。那几个issue我看了,是要点击节点才显示,我这个点了也不行。FF中发现把SVG换成png就可以。

@plainheart
Copy link
Member

plainheart commented May 27, 2020

Chrome不用点击也能显示图标吗?如果可以显示 那应该是另外的Bug了~

@100pah 100pah added this to the 4.9.0 milestone May 31, 2020
@100pah
Copy link
Member

100pah commented May 31, 2020

#12367 will probably resolve this issue.

@pissang pissang removed this from the 4.9.0 milestone Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants