Here is a sample dashboard showing how to set the colours for the pie charts using CSS - note that the order of the pie charts in the trellis is assumed to be fixed. <row>
<panel depends="$alw...
See more...
Here is a sample dashboard showing how to set the colours for the pie charts using CSS - note that the order of the pie charts in the trellis is assumed to be fixed. <row>
<panel depends="$alwayshide$">
<html>
<style>
#trellis_pie div.facets-container div.viz-panel:nth-child(1) g.highcharts-series path
{
fill: red !important;
}
#trellis_pie div.facets-container div.viz-panel:nth-child(2) g.highcharts-series path
{
fill: green !important;
}
#trellis_pie div.facets-container div.viz-panel:nth-child(3) g.highcharts-series path
{
fill: blue !important;
}
#trellis_pie div.facets-container div.viz-panel:nth-child(4) g.highcharts-series path
{
fill: yellow !important;
}
</style>
</html>
</panel>
<panel>
<chart id="trellis_pie">
<search>
<query>| makeresults count=100
| fields - _time
| eval Computer_Name=mvindex(split("ABCDE",""),random()%5).mvindex(split("ABCDE",""),random()%5)
| eval Category__Names_of_Patches=mvindex(split("XYZ",""),random()%3)
| stats count(Category__Names_of_Patches) as totalNumberOfPatches by Computer_Name
| eval exposure_level = case(
totalNumberOfPatches >= 1 AND totalNumberOfPatches <= 5, "Low Exposure",
totalNumberOfPatches >= 6 AND totalNumberOfPatches <= 9, "Medium Exposure",
totalNumberOfPatches >= 10, "High Exposure",
totalNumberOfPatches == 0, "Compliant",
1=1, "<not reported>"
)
| stats sum(totalNumberOfPatches) as total by exposure_level
| eval category=exposure_level
| xyseries category exposure_level total</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="charting.axisTitleX.visibility">collapsed</option>
<option name="charting.axisTitleY.visibility">collapsed</option>
<option name="charting.axisTitleY2.visibility">collapsed</option>
<option name="charting.chart">pie</option>
<option name="charting.drilldown">none</option>
<option name="charting.legend.placement">none</option>
<option name="trellis.enabled">1</option>
</chart>
</panel>
</row>