VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] bug of svg background

Open xile611 opened this issue 1 year ago • 0 comments

Version

1.12.5

Link to Minimal Reproduction

no

Steps to Reproduce


const spec = {
  type: 'line',
  data: [
    {
      id: 'line',
      values: [
        {
          x: 1,
          y: 1,
          serie: 'a'
        },
        {
          x: 2,
          y: 2,
          serie: 'a'
        },
        {
          x: 1,
          y: 2,
          serie: 'b'
        },
        {
          x: 2,
          y: 4,
          serie: 'b'
        },
        {
          x: 1,
          y: 3,
          serie: 'c'
        },
        {
          x: 2,
          y: 6,
          serie: 'c'
        },
        {
          x: 1,
          y: 4,
          serie: 'd'
        },
        {
          x: 2,
          y: 8,
          serie: 'd'
        }
      ]
    }
  ],
  xField: 'x',
  yField: 'y',
  seriesField: 'serie',
  legends: {
    visible: true,
    item: {
      focus: true,
      focusIconStyle: {
        symbolType: 'square',
        dy: 8,
        size: 10,
        // stroke: 'red',
        // lineWidth: 1,
        fill: false,
        background: `<svg xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 16 16" fill="none">
          <path fill-rule="evenodd" clip-rule="evenodd" d="M7 1C7 0.447715 7.44772 0 8 0C8.55229 0 9 0.447715 9 1V2.08296C11.5125 2.50448 13.4955 4.48749 13.917 7H15C15.5523 7 16 7.44772 16 8C16 8.55229 15.5523 9 15 9H13.917C13.4955 11.5125 11.5125 13.4955 9 13.917V15C9 15.5523 8.55229 16 8 16C7.44772 16 7 15.5523 7 15V13.917C4.48749 13.4955 2.50448 11.5125 2.08296 9H1C0.447715 9 0 8.55228 0 8C0 7.44772 0.447715 7 1 7H2.08296C2.50448 4.48749 4.48749 2.50448 7 2.08296V1ZM4.12602 9H4.66667C5.21895 9 5.66667 8.55229 5.66667 8C5.66667 7.44772 5.21895 7 4.66667 7H4.12602C4.4878 5.59439 5.59439 4.4878 7 4.12602V4.66667C7 5.21895 7.44772 5.66667 8 5.66667C8.55229 5.66667 9 5.21895 9 4.66667V4.12602C10.4056 4.4878 11.5122 5.59439 11.874 7H11.3333C10.781 7 10.3333 7.44772 10.3333 8C10.3333 8.55228 10.781 9 11.3333 9H11.874C11.5122 10.4056 10.4056 11.5122 9 11.874V11.3333C9 10.781 8.55229 10.3333 8 10.3333C7.44772 10.3333 7 10.781 7 11.3333V11.874C5.59439 11.5122 4.4878 10.4056 4.12602 9Z" fill="#1C1C23" fill-opacity="0.6"/>
       
        </svg>`
      }
    }
  }
};

Current Behavior

image

Expected Behavior

img_v3_02es_5f7e99b5-8b9b-4f27-9c64-e0b5ddf9a50g

svg 能够完整展示

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

xile611 avatar Sep 19 '24 11:09 xile611