Good Morning,
I need to dynamically set the colors of segments of bars in a Stacked Bar Chart. My task is to display the elapsed times that different engines have on or off over the course of a day.
I almost have what I need in a stacked bar chart using just the first three fields, (screen shot) However, I need the 'on' segments of a bar to be green, and the 'off' segments to be red, based on the values in a fourth field, 'Ignition'.
I have a MySQL procedure that returns a result set with four fields, such as:
Engine DateTime Elapsed Ignition
111 2015-01-02 01:03:12 01:03:15 On
I think I almost have the answer with the following code:
select distinct 'dbr.chart.options', 'bar_segment???', Ignition, '0xFF0000'from resultset??? where Ignition = 'Off'
select distinct 'dbr.chart.options', 'bar_segment???', Ignition, '0x00FF00'from resultset??? where Ignition = 'Off'
Any help will be much appreciated,
Mike