Dashboards & Visualizations

Pie Chart - Add a line break in the label

sebsg
New Member

I would like to add a line break in the label in order to have the full title as well as the value and the percentage

Actually :
alt text

Desired outcome :
alt text

End of SPL used :
....
| eventstats sum(tache) as total_tache
| eval percent = round((tache/total_tache)*100,2)
| eval DR=DR." (".'tache'.")".",".'percent'."%"
| rex mode=sed field=DR "s/,/\n/g"

I tried to use the command "sed", it works in a table but not in a pie chart.
Can you help me ?

0 Karma

to4kawa
Ultra Champion
| makeresults 
| eval _raw="BDDF BORDEAUX ILE_DE_FRANCE_SUD ILE_DE_FRANCE_NORD LILLE LYON MARSEILLE RENNIS STRASBOURG
8 23 65 81 10 38 43 32 23"
| multikv
| fields - _* linecount
| transpose 0 column_name=region
| rename "row 1" as count
| eventstats sum(count) as total
| eval perc= round(count / total * 100,2)."%"
| eval display=region."








(".count.") - ".perc
| table display count

pie chart

Default Pie Chart can't display multivalue and truncate long spaces.

0 Karma

sebsg
New Member

So there is no solution to this problem ?
Since it's impossible to make line breaks in a Pie Chart

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...