[Bug] `thumbnail` zoom behaviour breaks on type `graph` when SVG path is used as `symbol`

Open
#21,514 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start with the linked graph-force minimal reproduction and compare thumbnail initialization when series.symbol is an SVG path versus the default symbol. Trace the thumbnail and graph rendering entry points involved in force-layout data without x/y coordinates; done means the graph content is centered and not partially zoomed out in the thumbnail.

Written by the indexing model from the issue text.

Description

bug en pending
Version

6.0.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=graph-force&renderer=svg&code=dVVdb9owFH3vr_DDpoDGIMmAIqpOmtpJTAIxrR0Pm6bJSUxw59iZ40BpxX_f9UeIoV0eEvvc4-Tec66dN_2cqM635fL-99dP9zP0DgWDDCs8wFVFlB0yUr0vaEUkTmDYf6gED3poXfNUUcFRR-LdLfC66PkCoVTwSqFc4nKjQXRtUIS4yEg1RY7bN9N-gctORw-76Poj6lgmQjSbGn6fZj0HVfsiEeyOPhEXaoGGwnHRBPWwgVOsSC7k3oWaaRPeYlY3y8zY4Idu1xIcnfq5t5jlMMr_eGEzhcDhCm6iNBo1KiiqGHytKVSRRzVFwZxUaHEUODjWXCeOcEvWuGYKMbwXtToSlCghmAilRHEEGVnrJZLmGxXYYmxICcEUhRXPDmAkJxyk_ulWNlkhpG2ftiZ6FRvLWuud6c0liaolR2AvGKDLt9eh64YH8_xlP485LbB-zW0tzXOKolEYngU_44ry_HsJKYFwwd-ackXTL3x51AF0M_a8LMN2xP_kBUX2pY6bOj3Y6jITWyLn4OUUrTGrjv0EceMCLFwLmRJv4WDg-hRiSlLMc-aHXczTKyix2kwHg8WwF01WcTibrKLJbKinw1U0nun7EOZR6OIamMyicBGNHSUONSUaG8RwNAKc8SLuxfFqMr_sRfoRxe6p5_No0otncTSPDRrD-IeX6bn_Zrd6AtiGb-MGaOP-pnmtiVrm0eYXIkuBiylSsj7D7qGxcyK1bUwkmHlZPwkBSyJP8BQzMqcFBbP8Ni3wI_AuWyJAVLdf27G-2wkBQ_31paioTdptM_9N0BRQkjIpPicHuwXP3mka5_SdJMvJnPAc-gHFbhM0m6qsWWU-NzoJgLRbquBgC_ujkwwkNdtTB14tCddK3NRySzipwKJTkUlRbmDPAe6ntxZpDVCAswecEp7uT2oG_8md2vtHm712NNMFRaGH2kPAH50cC2pTFwnH1NPcvSWIRm-Pn90QrfwZuKM8E7sXmaSCCW2HzBPciYZhD8WwG1AMcmrtul4tiZAZkTf-gg_AGg970DAjTb_06aLEqbGg0dmWou_m-C_2NxssVR_-pUvzJ-jYH0L36uLQvfoH&enc=deflate

Steps to Reproduce
  1. Using the Les Miserables graph example, set the series.symbol as an SVG path. The SVG path used in the reproduction is the factory icon from the mdi library.
  2. Set graph to use 'force' for its layout and add a force configuration
    force: {
      edgeLength: 20,
      repulsion: 50,
      gravity: 0.5,
      friction: 0.1
    }
    
  3. Filter the Les Miserable graph data to only include properties needed, i.e. omit the x and y coordinates
Current Behavior

When an SVG path is used for the symbol property on a chart series of type graph, the thumbnail initialises its zoom incorrectly. The thumbnail shows the graph content as bottom-right and partially zoomed out.

Expected Behavior

The thumbnail should show the graph content as centered and not zoomed out.

Environment
- OS: macOS Sequoia 15.7.3
- Browser: Firefox 147.0.3
- Framework:
Any additional comments?

No response

Dominant language
TypeScript
Stars
67.7k
Forks
19.9k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/echarts

All issues in apache/echarts

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.