Dashboards & Visualizations

Changing data label font size

jhurtado
Engager

I want to make the numbers that appear within the bars of the dashboard bar chart bigger.
We have a screen that displays the bar chart but the numbers are too small to be seen unless you get closer, is there a way to make them appear bigger? I'm referring to the y-axis numbers that appear inside of the bars.

I was trying to access the source code and see if I could figure it out but so far all I know is that you can make them appear or not,

 "<option name="charting.chart.showDataLabels">all</option>"

vnravikumar
Champion

Hi @jhurtado

Check this

<dashboard>
  <label>barchart</label>
  <row depends="$hide$">
    <panel>
      <html>
        <style>
          #rk g[transform] text {
            font-size:20px !important;
          }
        </style>
      </html>
    </panel>
  </row>
  <row>
    <panel>
      <chart id="rk">
        <search>
          <query>index=_internal |stats count by sourcetype</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.drilldown">none</option>
        <option name="charting.chart.showDataLabels">all</option>
      </chart>
    </panel>
  </row>
</dashboard>

nordinethales
Explorer

Hello,

Thanks a lot!

It worked for me with Pie Chart label

 

Regards

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...