Skip to content

How to show ant design icon inside an annotation of type html? #850

Closed
@imaaditya-stack

Description

@imaaditya-stack

My annotation config

      {
        type: "html",
        position: { date: "2021/05/21 11:45:00 AM", score: "max" },
        html: (a: any, b: any) => {
          return `<svg width="24" height="24">
                    <circle cx="12" cy="12" r="11" fill='${"#ff1a1a"}' />
                    <text x="50%" y="50%" text-anchor="middle" fill="white" font-size="12px" font-family="Arial" dy=".3em">
                    '${(<InfoOutlined />)}'</text>
                    Sorry, your browser does not support inline SVG.
                </svg>`;
        },
        offsetX: -12,
        offsetY: -5,
      },

I want to show icon inside an annotation like this
Selection_059

But my above annotation implementation is not working, it shows like this

Selection_060

How do I achieve this ?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lxfu1@imaaditya-stack

        Issue actions

          How to show ant design icon inside an annotation of type html? · Issue #850 · ant-design/ant-design-charts