Hi,
im trying to build my own legend since I want to add further fields later and now im trying to construct a field containing the same color as the line in my chart. My thought is that this may be done by defining some colors in order with seriesColors and then in my legend fill a field with a color depending on the row index, i.e I want to set a color depending on if it is the first, second, third row and so on.
Im building my legends by filling a table with a search.
<form script="script.js" stylesheet="stylesheet.css">
<label>Events</label>
<fieldset submitButton="false">
...
</fieldset>
<row>
<panel depends="...">
<chart>
<title>Event meter</title>
<search>
<query>source="\xml\Splunk\run_\Event_meter.xml" | where run=$run_id$ | join type=inner EventID [search source="\xml\Splunk\run_\Event_map.xml" | where run=$run_id$] | timechart span=$time_span$ values(Value) AS response_time by EventGroup usenull=f limit=0</query>
</search>
<option name="charting.legend.masterLegend"></option>
<option name="charting.seriesColors">[0xFF0000,0xFFFF00,0x00FF00,...]</option>
</chart>
</panel>
</row>
<row>
<panel depends="...">
<table class="legend">
<title>Legend</title>
<search>
<query>source="\xml\Splunk\run_\Event_map.xml" | where run=$run_id$ | dedup EventGroup | table EventGroup</query>
</search>
</table>
</panel>
</row>
</form>
Thanks Simon
... View more