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

Legends.none still takes up space #41

Open
Janiczek opened this issue Mar 21, 2018 · 4 comments
Open

Legends.none still takes up space #41

Janiczek opened this issue Mar 21, 2018 · 4 comments

Comments

@Janiczek
Copy link

After changing Legends.default to Legends.none, there still is a space on the right that they would occupy. My intuition was that the rest of the plot should use this newly available space.

legends

@Janiczek
Copy link
Author

I just figured it would be wise to add some source code :)
Here's the Ellie: https://ellie-app.com/7RDwvBQ5Ja1/2

@MarkNijhof
Copy link

Take a look at Container.spaced as you can set the margins yourself

container = Container.spaced ("line-chart-" ++ name) 0 10 50 40

@Janiczek
Copy link
Author

Right, I was able to do Container.responsive without the legends margin like this:

        LCContainer.custom
            { attributesHtml = []
            , attributesSvg = []
            , size = LCContainer.relative
            , margin = LCContainer.Margin 40 30 60 80
            , id = "chart"
            }

I guess the question is: Shouldn't the final right margin value change based on whether the legends are there or not? Default chart with no Legends.none -> excess margin.

@terezka
Copy link
Owner

terezka commented Mar 23, 2018

Hi! Thanks for adding the issue! I will think of a way to make it more intuitive and get back to you. Until then, Mark pointed out the mending configuration!

dbrgn added a commit to gfroerli/web that referenced this issue Jun 10, 2018
The `Container.responsive` based container still provides space for the
legend even if it's set to `Legends.none`. See
terezka/line-charts#41.

As a workaround, set the container explicitly.
dbrgn added a commit to gfroerli/web that referenced this issue Jun 10, 2018
The `Container.responsive` based container still provides space for the
legend even if it's set to `Legends.none`. See
terezka/line-charts#41.

As a workaround, set the container explicitly.
dbrgn added a commit to gfroerli/web that referenced this issue Jun 10, 2018
The `Container.responsive` based container still provides space for the
legend even if it's set to `Legends.none`. See
terezka/line-charts#41.

As a workaround, set the container explicitly.
dbrgn added a commit to gfroerli/web that referenced this issue Jun 11, 2018
The `Container.responsive` based container still provides space for the
legend even if it's set to `Legends.none`. See
terezka/line-charts#41.

As a workaround, set the container explicitly.
dbrgn added a commit to gfroerli/web that referenced this issue Jun 11, 2018
The `Container.responsive` based container still provides space for the
legend even if it's set to `Legends.none`. See
terezka/line-charts#41.

As a workaround, set the container explicitly.
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

3 participants