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!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...