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

Disabling Legend entries by default is not working #809

Open
ptrkkr opened this issue Jul 2, 2024 · 0 comments
Open

Disabling Legend entries by default is not working #809

ptrkkr opened this issue Jul 2, 2024 · 0 comments

Comments

@ptrkkr
Copy link

ptrkkr commented Jul 2, 2024

Hi all!

I think this is the same as #792.
We are not able to disable legend entries by default. We want only to disable if the user opens the page but whenever he clicks on it, it should work for them.

I am doing the following:

builder.setOverrides((timerSeriesTable) => {
        timerSeriesTable
            .match(
                {
                    id: "byNames",
                    options: {
                        mode: "exclude",
                        names: [
                            "someLegendLabel
                        ],
                        prefix: "All except:",
                        readOnly: true
                    }
                })
            .overrideColor({
                fixedColor: "blue",
                mode: FieldColorModeId.Fixed,
            })
            .overrideCustomFieldConfig("hideFrom", {
                viz: true,
                legend: false,
                tooltip: false
            })

    })

This code disables the other legend entries by default but you can't click on it again to enable it if you want to see it. When you click on it, it looks something like this:
image
Before it looks like this:
image

I can see that in the Grafana dashboards, something like a __systemRef is used which i don't know how i can set in scenes.

I would appreciate some help!

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