Splunk Search

colour format in chart based on the list

iamniks
Explorer

Hi, I have a table

DATE AMOUNT
07/22/2014 1000
07/23/2014 2000
08/01/2014 500

and so on.

I have to get a bar chart of decreasing amount and date. which is easy. Now i have to represent the latest date in that chart in a different colour. Is that possible

Tags (2)
0 Karma

somesoni2
Revered Legend

Give this a try.

Your search giving fields DATE, AMOUNT | eval LATEST=strptime(DATE,"%m/%d/%Y") 
| eventstats max(LATEST) as LATEST1 | eval LATESTAMT=if(LATEST=LATEST1,AMOUNT,0) | eval AMOUNT=if(LATEST=LATEST1,0,AMOUNT)| table DATE, AMOUNT, LATESTAMT 

Use this to generate a stacked bar chart and for the latest record it should show in different color (with different series name 'LATESTAMT')

0 Karma

iamniks
Explorer

many. it will keep updating the list on when a transaction happens on that date. so i need a query to find the latest date in the list at any point in time

0 Karma

somesoni2
Revered Legend

How many rows can be there in the table?

0 Karma

MuS
Legend

Hi iamniks,

Yes, you can do this - but you need to tweak some css and js files to achieve this. See this http://answers.splunk.com/answers/83206/color-in-a-table-based-on-values or this app http://apps.splunk.com/app/570/.

hope this helps ...

cheers, MuS

0 Karma

iamniks
Explorer

thanks for the response but we can use the above if we know what is the expected value but in my case i dont know what is the latest date in the list

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 ...