Dashboards & Visualizations

How do you disable legends using SplunkJS?

sklass
Path Finder

Simple question - Using SplunkJS how do you disable the legend all together.

        // Create a search manager
        var mysearch = new SearchManager({
            id: "mysearch",
            preview: true,
            search: "project={{ object.name }} | stats dc(path) by variant"
        });

        // Create a chart view that is bound to the search manager
        var mychart = new ChartView({
            id: "mychart",
            managerid: "mysearch",
            type: "bar",
            el: $("#chart1"),
            "charting.axisTitleY.text": "Top Variants by File Count",
            "charting.legend.labels": "Foo"

        }).render()
1 Solution

sklass
Path Finder

Add this option..

"charting.legend.placement" = "none",

View solution in original post

sklass
Path Finder

Add this option..

"charting.legend.placement" = "none",
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...