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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...