Skip to content

Lable placement#6

Open
face wants to merge 4 commits intomykola-digtiar:masterfrom
face:lable-placement
Open

Lable placement#6
face wants to merge 4 commits intomykola-digtiar:masterfrom
face:lable-placement

Conversation

@face
Copy link

@face face commented Jun 24, 2018

One solution for #2

This PR moves labels to the left and down, instead of up off the screen.

NOTE: This PR has some things specific to our needs, so it may not be ready to merge as a generic solution. The things that might be specific to us:

  1. We don't use a background color, so we use the text for label placement so they are close together.
  2. Works ok for a few small pie slices. However, probably won't work to well if there are too many slices.
  3. We removed a check that the labels don't touch the pie, because it would cause an infinite loop if the lables moving down hit the chart.

Even though this is probably not generic enough for everyone, I'm submitting this PR as it may help someone and give the maintainers ideas how to solve this bug.

harlamenko pushed a commit to harlamenko/chartjs-plugin-piechart-outlabels that referenced this pull request Aug 8, 2024
Reorganizes sample files, in order to make the sample visible on Netlify.

- `index.html` is moved to root directory in order to make the Netlify configuration simpler. It's also more compatible to some builders like Vite (see https://vitejs.dev/guide/#index-html-and-project-root)
- Remove external libraries copied in the repo, use jscolor from CDN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant