Skip to content

How to make a bar's height fixed? #6608

Description

@MardanovaA

Hello!
I'm having trouble with the chart height on mobile devices. My project may have many legend elements. If this is the case, the chart itself becomes very small. By default, the entire chart block takes up 425 pixels. I want to make it so that when the legend is enlarged, it expands downwards without interfering with the chart. Or set a fixed chart height (excluding the legend) of 300 pixels.

I haven't found a solution, but I liked the idea of ​​a legend portal.
I updated the library to version 3.3.0 and, unfortunately, discovered that despite the legend portal, the chart still draws in a way that leaves empty space for the legend, which is actually located outside of it.

I created a sandbox for convenience. There are versions with and without a portal, but neither works as I need. I'm sure the solution is out there, but I can't find it, despite reviewing all the issues.

Thank you for any participation!

sandbox here - https://stackblitz.com/edit/9b7eey1w

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugGeneral bug label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions