apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.64k stars 19.61k forks source link

[Bug] svg rendering part of the area is displayed as black blocks #17682

Open peng3693 opened 2 years ago

peng3693 commented 2 years ago

Version

5.3.3

Link to Minimal Reproduction

No response

Steps to Reproduce

`
echarts.registerMap('f1', {svg: svg}); var chartDom = document.getElementById('firstMapEcharts'); var myChart = echarts.init(chartDom, null, {renderer: 'svg'});

  var option = {
    geo: {
      map: 'f1',
      roam: false,
      left: "10px",
      top: "10px",
      right: "-450px",
      bottom: "20px",
      layoutSize: '100%',
      selectedMode: 'false',
      emphasis: {
        label: {
          show: false
        }
      }
    }
  };
  myChart.setOption(option);
  myChart.getOption();`

Current Behavior

Using echarts to display the svg map, the color of some areas in the figure is lost and displayed as black blocks

image

Expected Behavior

This is the original display of the svg image, use html to display this svg image, all colors are displayed normally

image

Environment

- OS:mac
- Browser:chrome
- Framework:"react": "^18.2.0",

Any additional comments?

No response

artokhotnikov commented 1 year ago

try removing the fill attribute from the element and adding style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none" it helped me