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

Using custom label distribution #74

Open
piper-of-dawn opened this issue Dec 19, 2022 · 1 comment
Open

Using custom label distribution #74

piper-of-dawn opened this issue Dec 19, 2022 · 1 comment

Comments

@piper-of-dawn
Copy link

Hi,

I am creating a cash flow diagram using d3-milestones. Here label distribution has a meaning, those at the top would mean positive cashflows and those at the bottom would mean negative cashflows. Is there a way in the API, I can override the finite number of settings in the label distribution?

Example of what I am trying to create: https://observablehq.com/d/03829cdc3aec920a

@walterra
Copy link
Owner

Hey,

Unfortunately, the way the current layout algorithm works, it doesn't allow for this kind of custom distribution.

The way I worked around this so far was to create two instances and pass in the filtered items I wanted to show with distribution top and bottom. This will require more custom code unfortunately if you'd like to do something like you with multiple timelines split by a category. https://walterra.github.io/d3-milestones/?path=/story/d3-milestones--lord-of-the-rings

I'm currently working on a layout update that will make this kind of feature possible sometime in the future, no promises but it could be ready early next year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants