Skip to content

[Bug] Tooltip coordinate markers created by "makeStyleCoord" are not disposed #19998

Closed
@csisy-bt4w

Description

@csisy-bt4w

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQegsJiAIwArAAMPLAATADMmTnZACxZ2ckAHFnJualVRQDspQBs6dahHhTUdP4Q0MpxdiRtJGDAwP6QIG5xjCDU0AJywHQARsAC3KGDdgDcQA

Steps to Reproduce

  1. Set the tooltip to append to the body
  2. The tooltip will create these "marker points" inside the makeStyleCoord function
  3. These elements will be appended to the body
  4. Dispose the chart

Current Behavior

When the chart is disposed (and thus the tooltip is disposed), these marker elements are not removed from the DOM. This is kind of unexpected in a SPA, where the whole component is destroyed.
image

Expected Behavior

These elements should not remain cached when all charts (we currently have a single one) are disposed.

Environment

- OS: Windows 11
- Browser: Chrome 125.0.6422.114
- Framework: Angular@17

Any additional comments?

It's not that big of a deal since these are hidden, 0x0 elements, but still, unnecessary 4 elements in the DOM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in English

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions