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

Scrollable legends box #1017

Open
CheapGamma opened this issue Nov 5, 2024 · 0 comments
Open

Scrollable legends box #1017

CheapGamma opened this issue Nov 5, 2024 · 0 comments

Comments

@CheapGamma
Copy link

Hello! The question is simple, is it possible to make the scrollable box for legends?

I tested several css variants like this:

`

.scrollable-legend {
display: flex !important;
overflow-x: auto;
padding-top: 5px;
border-top: 1px solid #ccc;
}

.scrollable-legend .u-series {
display: inline-block;
margin-right: 15px;
}

`

in hooks:
`

    hooks: {
      ready: [
        (u) => {
            chartStyles(u);
            const legendEl = u.root.querySelector(".u-legend");

            if (legendEl) {
              legendEl.classList.add("scrollable-legend");
            }
        },
      ],
    }

`

`

series: [
    {},
    { label: "Series 1" },
    { label: "Series 2" },
    { label: "Series 3" },
    { label: "Series 4" },
    { label: "Series 5" },
    { label: "Series 6" },
    { label: "Series 7" },
    ...
    { label: "Series 100" },
],

`

Снимок экрана 2024-11-05 190233

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

No branches or pull requests

1 participant