Good Morning, again,
Is there a way to customize the legend colors, similar to the bar colors?
I have the bars the way I need them, here. Now if I can just get the legend the way I need it, here.
I have found that if I switch the ‘event_date’ and ‘Ignition’ fields in my query the legend appears the way I need it, but the elapsed times are summed.
————— This is the code to get the desired bar segments ———————————
/* make the temp table in the database */
CALL temp_table_procedure;
/*myDBR chart code */
select 'dbr.title', 'Elapsed Times Between Events - Chart';
select 'dbr.chart', 'StackedBar';
select 'dbr.chart.options', 'label_color', event_date, if (Ignition='On', '0x42B64A^', '0xE85854') from temp_table;
SELECT
Asset,
event_date,
Elapsed,
Ignition
FROM
temp_table;
————————— Rearranging the Ignition and event_date fields produces the desired legend —————
SELECT
Asset,
Ignition,
Elapsed,
event_date
FROM
temp_table;
Thanks in advance,
Mike