Dashboards & Visualizations

remove the label in piechart

venky1544
Builder

Hello Evryone

i have a panel with piechart i want to remove the highlighted part in the panel its coming with the chart its not the title 

venky1544_0-1690407976069.png

 

Labels (2)
0 Karma
1 Solution

venky1544
Builder

hi @vinod743374 

yes its a field name in the query results

just an example below 

| makeresults
| eval data=" Market=UK, Question=location, Answer=London;
Market=USA, Question=location, Answer=New York;
Market=UK, Question=PET, Answer=dog;
Market=USA, Question=PET, Answer=cat"
| makemv data delim=";"
| mvexpand data
| rename data as _raw
| KV
| stats count by Question, Answer
| eval Answer=Answer."(".count.")"

 

venky1544_0-1690464085463.png

 

<dashboard>
<label>TEST_DATSET</label>
<row>
<panel>
<title>Trellis by Questions</title>
<chart>
<search>
<query>| makeresults
| eval data=" Market=UK, Question=location, Answer=London;
Market=USA, Question=location, Answer=New York;
Market=UK, Question=PET, Answer=dog;
Market=USA, Question=PET, Answer=cat"
| makemv data delim=";"
| mvexpand data
| rename data as _raw
| KV
| stats count by Question, Answer
| eval Answer=Answer."(".count.")"</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="charting.chart">pie</option>
<option name="charting.chart.bubbleMaximumSize">50</option>
<option name="charting.chart.bubbleMinimumSize">10</option>
<option name="charting.chart.bubbleSizeBy">area</option>
<option name="refresh.display">progressbar</option>
<option name="charting.chart.showLabels">false</option>
<option name="trellis.enabled">1</option>
<option name="trellis.scales.shared">1</option>
<option name="trellis.size">medium</option>
</chart>
</panel>
</row>
</dashboard>

View solution in original post

0 Karma

venky1544
Builder

hi @vinod743374 

i already tried it's not working i can still see it 

venky1544_0-1690460228403.png

 

0 Karma

vinod743374
Communicator

Does that name relate to the Field name of your query results?

We didn't find any labels after that line is been added in our dashboard,
I don't know why it is still showing in your case.

May I know the version of your Splunk.

venky1544
Builder

hi @vinod743374 

yes its a field name in the query results

just an example below 

| makeresults
| eval data=" Market=UK, Question=location, Answer=London;
Market=USA, Question=location, Answer=New York;
Market=UK, Question=PET, Answer=dog;
Market=USA, Question=PET, Answer=cat"
| makemv data delim=";"
| mvexpand data
| rename data as _raw
| KV
| stats count by Question, Answer
| eval Answer=Answer."(".count.")"

 

venky1544_0-1690464085463.png

 

<dashboard>
<label>TEST_DATSET</label>
<row>
<panel>
<title>Trellis by Questions</title>
<chart>
<search>
<query>| makeresults
| eval data=" Market=UK, Question=location, Answer=London;
Market=USA, Question=location, Answer=New York;
Market=UK, Question=PET, Answer=dog;
Market=USA, Question=PET, Answer=cat"
| makemv data delim=";"
| mvexpand data
| rename data as _raw
| KV
| stats count by Question, Answer
| eval Answer=Answer."(".count.")"</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="charting.chart">pie</option>
<option name="charting.chart.bubbleMaximumSize">50</option>
<option name="charting.chart.bubbleMinimumSize">10</option>
<option name="charting.chart.bubbleSizeBy">area</option>
<option name="refresh.display">progressbar</option>
<option name="charting.chart.showLabels">false</option>
<option name="trellis.enabled">1</option>
<option name="trellis.scales.shared">1</option>
<option name="trellis.size">medium</option>
</chart>
</panel>
</row>
</dashboard>

0 Karma

venky1544
Builder

Hi @vinod743374 

css hack worked for my query any tips on how can learn these CSS style formattings 

0 Karma

vinod743374
Communicator

Hi @venky1544 

The only way is to do with CSS by assigning an id to the chart and apply some CSS.
the examples code is given below, you can try if u have no issues with applying CSS.

<dashboard version="1.1">
<label>TEST_DATSET</label>
<row>
<panel>
<title>Trellis by Questions</title>
<chart id="single1">
<search>
<query>| makeresults
| eval data=" Market=UK, Question=location, Answer=London;
Market=USA, Question=location, Answer=New York;
Market=UK, Question=PET, Answer=dog;
Market=USA, Question=PET, Answer=cat"
| makemv data delim=";"
| mvexpand data
| rename data as _raw
| KV
| stats count by Question, Answer
| eval Answer=Answer."(".count.")"</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="charting.axisTitleX.visibility">collapsed</option>
<option name="charting.axisTitleY.visibility">collapsed</option>
<option name="charting.axisTitleY2.visibility">collapsed</option>
<option name="charting.chart">pie</option>
<option name="charting.chart.bubbleMaximumSize">50</option>
<option name="charting.chart.bubbleMinimumSize">10</option>
<option name="charting.chart.bubbleSizeBy">area</option>
<option name="charting.chart.showLabels">0</option>
<option name="charting.legend.placement">none</option>
<option name="refresh.display">progressbar</option>
<option name="trellis.enabled">1</option>
<option name="trellis.scales.shared">1</option>
<option name="trellis.size">medium</option>
<option name="trellis.splitBy">Question</option>
</chart>
</panel>
</row>
<row depends="$dontmatch$">
<panel>
<html>
<style>
div#single1 .facet-label {
display: none !important;
}
</style>
</html>
</panel>
</row>
</dashboard>

 

 

Thankyou.

0 Karma

vinod743374
Communicator

You Can try by removing the labels in the pie chart.

To achieve this by adding this below line in to the options of your pie chart in the source code.

<option name="charting.chart.showLabels">false</option>


Let me know if this works for you.



Thankyou!!

0 Karma
Get Updates on the Splunk Community!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...