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

Missing item anchors in pie charts #96

Open
esposm03 opened this issue Nov 29, 2024 · 0 comments
Open

Missing item anchors in pie charts #96

esposm03 opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
👿 bug Something isn't working

Comments

@esposm03
Copy link

Citing from the manual for the piechart function:

The chart places one anchor per item at the radius of it’s slice that gets named "item-" (outer radius) and "item--inner" (inner radius), where index is the index of the sclice data in data.

Given the above, I would expect to be able to use an anchor like item-1 to reference the chart slices; however, the following code panics with Anchor 'item-1' not in anchors ("default", "chart", "legend", "center") for element 'pie'

#import "@preview/cetz:0.3.1": *
#import "@preview/cetz-plot:0.1.0": *

#canvas({
  import draw: *

  chart.piechart((1, 2), name: "pie")

  line("pie.item-1", (2, 0))
})
@johannes-wolf johannes-wolf self-assigned this Nov 29, 2024
@johannes-wolf johannes-wolf added the 👿 bug Something isn't working label Nov 29, 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