mapping dom
mapping dom

Reputation: 1955

Can I hide a chart title in Superset?

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

Upvotes: 6

Views: 9866

Answers (4)

Jonathan Hult
Jonathan Hult

Reputation: 1480

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

Upvotes: 3

yunis guliyev
yunis guliyev

Reputation: 1

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

Upvotes: 0

David Tobiano
David Tobiano

Reputation: 1258

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

Upvotes: 6

Jonathan Hult
Jonathan Hult

Reputation: 1480

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

Upvotes: 4

Related Questions