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

[Bug] bug of svg background #3250

Closed
xile611 opened this issue Sep 19, 2024 · 0 comments
Closed

[Bug] bug of svg background #3250

xile611 opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@xile611
Copy link
Contributor

xile611 commented Sep 19, 2024

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 xile611 added the bug Something isn't working label Sep 19, 2024
@xile611 xile611 closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants