Search code examples
splunksplunk-querysplunk-dashboard

How to change the color of the viz in the splunk dashboard


 <panel>
      <title>Lambda Order retry call status</title>
      <html depends="$hideCSSStyleOverride$">
        <style>
          #mychart3 g.apexcharts-xaxis-texts-g text{
            fill: grey !important;
          }
        </style>
      </html>
      <viz id="mychart3" type="Splunk_ML_Toolkit.HeatmapViz">
        <title>Order retry Lambda</title>
        <search>
          <query>index=serverless$environment$ service="credit-header" sourcetype="applogs" | stats
        count(eval(message="retryorderrequeststart")) as INVOKE
        count(eval(message="retryorderrequestsuccess")) as SUCCESS
        count(eval(message="retryorderrequesterror")) as ERROR
        by sourcetype</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <refreshType>delay</refreshType>
        </search>
        <option name="Splunk_ML_Toolkit.HeatmapViz.highlightDiagonals">true</option>
        <option name="drilldown">all</option>
        <option name="refresh.display">progressbar</option>
      </viz>
    </panel>

image : enter image description here

for success and error i am getting the same color , need a help to change the different color for error, invoke and success


Solution

  • I believe you can't change the colors. The only configurable item for the heatmap visualization is "highlightDiagonals". Colors are selected by the visualization based on the relative values of the search results. If two fields have the same color then they have similar values.

    If you need different colors for each field then you need a different visualization.