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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...