unfortunately it still does not work.
I copied your query into the search bar - it looks fine.
When I change the query in my dashboard source code - the visualization is different.
Here is my code behind:
<chart>
<search>
<query>index=_* earliest=-15m|eval app_risk=case(sourcetype="splunkd","Very Low",sourcetype="audittrail","Medium",sourcetype="kvstore","Low",sourcetype="splunkd_access","Critical",sourcetype="splunk_web_access","High")|search app_risk=*
|bucket span=5m _time|chart count over _time by app_risk| fields _time,Critical,High,Medium,Low,"Very Low"
<earliest>$general_overview_time_picker.earliest$</earliest>
<latest>$general_overview_time_picker.latest$</latest>
</search>
<option name="charting.axisTitleX.visibility">collapsed</option>
<option name="charting.axisTitleY.text">Logs</option>
<option name="charting.axisY.abbreviation">auto</option>
<option name="charting.chart.stackMode">stacked</option>
<option name="charting.legend.labels">[Unknown,"Very Low",Low,Medium,High,Critical]</option>
<option name="charting.legend.placement">bottom</option>
<option name="charting.seriesColors">[#A6A6A6,#6FA0F9,#89C73A,#FFE614,#FF8B1A,#E55D5D]</option>
<option name="refresh.display">progressbar</option>
<option name="trellis.enabled">0</option>
<option name="trellis.size">small</option>
</chart>
... View more