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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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