Hi ,
This is re-putative question> I have verified couple articles to write query for updating colors based on value. I am able to set colors for a specified field, but it's not applying in the graph. Below is the my search.
index=main sourcetype=iis |eval page_time_taken=if(lower(cs_uri_stem)="/view/pages/default.aspx" AND sc_status!="401",time_taken,null()) |timechart avg(page_time_taken) as Average_Response|eval result= if(Average_Response<800, "Green",null())|eval result1=if(Average_Response>800 AND Average_Response<1000, "Yellow",null())|eval result2=if(Average_Response>1000, "Red",null())| rename result as "Average Response Time Below 800ms" result1 as "Average Response Time Below 1000ms" result2 as "Average Response Time Above 1000ms"
Here, it is always Highlighting Average_Respond Color.
Below is my dashboard XML.
Average_Response_Time_Test_Dashboard
<panel>
<chart>
<search>
<query>index=main sourcetype=iis |eval page_time_taken=if(lower(cs_uri_stem)="/view/pages/default.aspx" AND sc_status!="401",time_taken,null()) |timechart avg(page_time_taken) as Average_Response|eval result= if(Average_Response <800, "Green",null())|eval result1=if(Average_Response>800 AND Average_Response<1000, "Yellow",null())|eval result2=if(Average_Response>1000, "Red",null())| rename result as "Average Response Time Below 800ms" result1 as "Average Response Time Below 1000ms" result2 as "Average Response Time Above 1000ms"</query>
<earliest>-60m@m</earliest>
<latest>now</latest>
</search>
<option name="charting.legend.placement">right</option>
<option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
<option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
<option name="charting.layout.splitSeries">0</option>
<option name="charting.drilldown">all</option>
<option name="charting.chart.style">shiny</option>
<option name="charting.chart.stackMode">default</option>
<option name="charting.chart.sliceCollapsingThreshold">0.01</option>
<option name="charting.chart.showDataLabels"></option>
<option name="charting.chart.nullValueMode">gaps</option>
<option name="charting.chart.bubbleSizeBy">area</option>
<option name="charting.chart.bubbleMinimumSize">10</option>
<option name="charting.chart.bubbleMaximumSize">50</option>
<option name="charting.chart">column</option>
<option name="charting.axisY2.scale">inherit</option>
<option name="charting.axisY2.enabled">0</option>
<option name="charting.axisY.scale">linear</option>
<option name="charting.axisX.scale">linear</option>
<option name="charting.axisTitleY2.visibility">visible</option>
<option name="charting.axisTitleY.visibility">visible</option>
<option name="charting.axisTitleX.visibility">visible</option>
<option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
<option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
<option name="charting.fieldColors">{"Average Response Time Above 1000ms":0xFF0000,"Average Response Time Below 1000ms":0xFFFF00,"Average Response Time Below 800ms":0x00FF00}</option>
</chart>
</panel>
Please help me on this.
... View more