All Apps and Add-ons
Highlighted

Timeline - Custom Visualization: How to hide the legend?

Explorer

I'm incorporating the Timeline - Custom Visualization into a dashboard for a custom app. The legend on the right causes the panel to scroll for a long time (due to us charting multiple events). Is there an option i can specify which would 'hide' the legend without needing a CSS type hack to remove it?

Almost something like :

    <option name="timeline_app.timeline.legend">none</option>
Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Splunk Employee
Splunk Employee

Just use:

<option name="charting.legend.placement">none</option>
Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Explorer

Its a custom vizualisation app from splunkbase .... uses the directive so chart options don't work with it...

  <viz type="timeline_app.timeline">
    <search>
<--  SNIP -->
        </search>
    <option name="height">189</option>
    <option name="timeline_app.timeline.axisTimeFormat">MINUTES</option>
    <option name="timeline_app.timeline.colorMode">categorical</option>
    <option name="timeline_app.timeline.legend">none</option>
    <option name="timeline_app.timeline.legend.placement">none</option>
    <option name="timeline_app.timeline.maxColor">#DA5C5C</option>
    <option name="timeline_app.timeline.minColor">#FFE8E8</option>
    <option name="timeline_app.timeline.numOfBins">6</option>
    <option name="timeline_app.timeline.tooltipTimeFormat">MINUTES</option>
    <option name="timeline_app.timeline.useColors">1</option>
    <option name="height">400</option>
  </viz>
0 Karma
Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Super Champion

http://docs.splunk.com/Documentation/Timeline/1.1.0/TimelineViz/TimelineXML

I don't use this app, but I don't see anything in the docs about hiding the legend.

0 Karma
Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Explorer

Yea nothing in the docs... so was asking if anyone knew a way of hiding the legend, say, with JS considering it is a D3js visualisation or if anyone has done anything similar before?

0 Karma
Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Motivator

did you get a soution to this, i have the same issue?

0 Karma
Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Explorer

i ended up doing it with custom css styling to 'hide' it and then limit force the width of the panel to fit... hopefully something that gets added to it in time

View solution in original post

Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Builder

Hi, I am looking for same thing. it will be great help if you can guide how to do it with css ?

Thanks
Ankit

0 Karma
Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Legend

@agoyal, Timeline app uses legend class for displaying/styling Legends

You can add ID/s to Timeline Panel

<viz type="timeline_app.timeline" id="timeline1">

And you can use CSS Style similar to the following to hide legends:

<html depends="$alwaysHideCSSStyleHTML$"
    <style>
       #timeline1 .legend{
             visibility:hidden !important;
       }
    </style>
</html>



| eval message="Happy Splunking!!!"


Highlighted

Re: Timeline - Custom Visualization: How to hide the legend?

Builder

@niketnilay : Thanks, I have added this css in .css file which is included in dashboard.

.timeline1.legend{
 visibility:hidden !important;
}

its not working 😞

0 Karma