Dashboards & Visualizations

How to show an empty pie chart when all field values are zero?

sachinlokulwar
New Member

I have two fields as Used disk and Total disk, but right now, both fields are zero.
So, how can I show an empty pie chart as a rounded circle only?

Tags (1)
0 Karma

somesoni2
Revered Legend

What's the query you're using? There are several posts from the past which shows how to show a 0 values if the searches doesn't return any data. Some say about appendpipe OR append but it depends upon what your current search is that populates the pie chart.

0 Karma

sachinlokulwar
New Member

search="sourcetype=aerospike stanza=cluster |table Total_bytes_disk Used_bytes_disk | transpose"|token_safe

I use the above query,But i doesn't get anything on my dashboard

0 Karma

woodcock
Esteemed Legend

If you use chart, and select the Pie visualization, you should get an empty circle when there are no events. Use this search exactly and you will see what I mean:

|noop|chart count
0 Karma

woodcock
Esteemed Legend

The noop was just to create a run-anywhere search that shows 0 for count; it is not a command that will be of any use to you. Why don't you switch from a Pie chart to a Marker Gauge visualization and use a search like this instead:

sourcetype=aerospike stanza=cluster | eval Percent=100*(Used_bytes_disk/Total_bytes_disk) | fields Percent

This is a much more appropriate and powerful infographic, IMHO.

0 Karma

sachinlokulwar
New Member

It will work with count only.How can I show values with this

sourcetype=aerospike stanza=cluster |table Total_bytes_disk Used_bytes_disk | transpose

for this query how can I use the |noop

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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