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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...