Splunk Enterprise
Splunk Version: 7.2.7
Build: f817a93effc2
Hello everyone,
I've got a dashboard in which i've got colors defined as tokens and this solution has always worked up until now. The panel just refused the fieldColors definition of the chart panel.
<init>
<set token="Prio1Color">0xff0000</set>
<set token="Prio2Color">0xffc000</set>
<set token="Prio3Color">0x00b050</set>
<set token="Prio4Color">0x2e75b6</set>
<set token="Prio5Color">0x548235</set>
</init>
(...)
<panel>
<chart>
<title>Resolved in $Report_Type$</title>
<search base="BaseSearch">
<query>| search CreationDate = "*"
| search Priority IN($prio$)
| where Month>=strftime(relative_time(strptime("$startTime$","%Y-%m-%d %H:%M:%S" ),"-1mon"),"%Y-%m") AND Month<="$endTime$"
| append
[| gentimes $gentime$
| eval _time=strptime(strftime(endtime, "%Y-%m-%d %H").":00:00", "%Y-%m-%d %H:%M:%S")
| fields _time
| dedup _time]
| fillnull value=0 $Report_Type$
| timechart span=1month sum($Report_Type$) as "Resolved in Team" by Priority
| fields - NULL
| addtotals</query>
</search>
<option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
<option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
<option name="charting.axisLabelsY.majorLabelVisibility">hide</option>
<option name="charting.axisTitleX.visibility">collapsed</option>
<option name="charting.axisTitleY.visibility">collapsed</option>
<option name="charting.axisTitleY2.visibility">visible</option>
<option name="charting.axisY2.abbreviation">none</option>
<option name="charting.axisY2.scale">inherit</option>
<option name="charting.chart">column</option>
<option name="charting.chart.nullValueMode">gaps</option>
<option name="charting.chart.overlayFields">Total</option>
<option name="charting.chart.showDataLabels">all</option>
<option name="charting.chart.stackMode">stacked</option>
<option name="charting.fieldColors">{"Planned": $PlannedColor$,"Prio1":$Prio1Color$, "Prio2": $Prio2Color$,"Prio3":$Prio3Color$, "Prio4": $Prio4Color$,"Prio5":$Prio5Color$</option>
<option name="charting.legend.placement">bottom</option>
</chart>
</panel>
This just doesn't work at all... I've checked and re-checked and this doesn't seem to add up..
Can you help me out with this issue?
Best Regards,
Rui
Hi
Check with having "}"
<option name="charting.fieldColors">{"Planned": $PlannedColor$,"Prio1":$Prio1Color$, "Prio2": $Prio2Color$,"Prio3":$Prio3Color$, "Prio4": $Prio4Color$,"Prio5":$Prio5Color$}</option>
Hi
Check with having "}"
<option name="charting.fieldColors">{"Planned": $PlannedColor$,"Prio1":$Prio1Color$, "Prio2": $Prio2Color$,"Prio3":$Prio3Color$, "Prio4": $Prio4Color$,"Prio5":$Prio5Color$}</option>
Yeah, that's the problem, what a dunce didn't even notice this!
Thanks a lot!
welcome!!!
Hi,
Could you please try after modifying the init as below. Defining plannedColor in init as well.
Please try and let us know.
<init>
<set token="PlannedColor">0x5eb246</set>
<set token="Prio1Color">0xff0000</set>
<set token="Prio2Color">0xffc000</set>
<set token="Prio3Color">0x00b050</set>
<set token="Prio4Color">0x2e75b6</set>
<set token="Prio5Color">0x548235</set>
</init>
I've put it there, but still didn't solve the issue. It was just a lack of } in the option element.
Thanks anyway for your suggestion!