Can I hide a chart title in Superset?
Asked Answered
P

4

6

In the below, I'm trying to hide the text "PV Monocrystalline" to provide a bit more room for the number. If i delete the content it still occupies the space and shows <empty> as the title. Is hiding this part of the chart entirely an option?

enter image description here

Play answered 17/9, 2019 at 17:15 Comment(0)
U
6

You should be able to accomplish this by editing the CSS of the dashboard the chart is displayed on:

  1. Go to your dashboard, and click on Edit Dashboard

  2. Click on the dropdown (next to Switch to View Mode), and select "Edit CSS"

  3. In the "Live CSS Editor" box; type some CSS that will make the header disappear.

    This should work

    .chart-header {
        display: none;
    }
    
  4. Close the popup, and Save Changes

Unblinking answered 18/9, 2019 at 1:58 Comment(2)
Thank you, that hides the header by the space doesn't get reassigned so the number stays the same size. I think that's probably an edit to create a custom chart typePlay
Hiding the header also disables the ability to edit/explore the chart from the dashboard. Removing subheader_line would get you some more room but is presumably a global setting. The number itself doesn't occupy the full height of it's container so will explore. Thanks for pointing me in the right directionPlay
R
4

As of release 1.3.0, you can use this dashboard CSS:

.header-title > .editable-title {
  display:none;
}

This doesn't necessarily provide more space. But it does hide titles for charts.

Before: Before

After: After

Raskin answered 12/10, 2021 at 17:1 Comment(2)
This is hiding header for all the charts. Is there a way to hide it only for a specif chart in a Dashboard?Vacillatory
@RahulDiggi - see my other answer I just posted: stackoverflow.com/a/77585957Raskin
R
3

You can find and use the chart's specific chartID. See here for more info.

Example:

[data-test-chart-id="102"] > div:first-child {
    display: none;
}

Before:

enter image description here

After:

enter image description here

Raskin answered 1/12, 2023 at 14:26 Comment(0)
U
0

The easiest way of hiding chart name is to rename it as an empty character. There is the link where you can get one: https://www.editpad.org/tool/invisible-character

Unweave answered 27/9, 2023 at 13:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.