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

inline clip-path instead of id ref #9471

Open
1 task done
pluswave opened this issue Nov 14, 2024 · 2 comments
Open
1 task done

inline clip-path instead of id ref #9471

pluswave opened this issue Nov 14, 2024 · 2 comments
Labels
Enhancement 🎉 Need Clarification ❔ Needs clarification before we can proceed.

Comments

@pluswave
Copy link

Enhancement Description

I have a hexo blog with hexo-filter-kroki filter, which in turn, can render MULTIPLE vega-lite diagrams in ONE markdown file. the problem is that, when I set

{
  "mark": { "clip": true }
}

the result svg will have two parts to do this, part one is something like

<g  ... clip-path="url(#clip1)"  ... >

part two is something like

<defs>
<clipPath id="clip1">
...
</clipPath>
</defs>

however, for multiple diagrams inlined in one html document, the id of clipPath conflicts and the renderer in browser is not correct except the first graph. To resolve this issue, I suggest make the clip-path attribute inline for part one , and completely discards part two.

Checklist

  • I checked for duplicate issues.
@domoritz
Copy link
Member

That's a good suggestion. This is an issue with Vega, not Vega-Lite, right?

@domoritz domoritz added the Need Clarification ❔ Needs clarification before we can proceed. label Nov 15, 2024
@pluswave
Copy link
Author

I don't know which repo this issue belongs to. Just checked the compiled version of vega, also includes

{
  "mark": {
  ... 
 "clip": true 
  }
}

So maybe it belongs to vega.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 🎉 Need Clarification ❔ Needs clarification before we can proceed.
Projects
None yet
Development

No branches or pull requests

2 participants