Hi
I'm looking to create a column chart where the the colour of the columns change depending on a value.
This is where I've gotten to:
declare v_color1 varchar(10);
declare v_color2 varchar(10);
declare v_color3 varchar(10); set v_color1 = '0xFF0000';
set v_color2 = '0x008000';
set v_color3 = '0x0074D9'; select 'dbr.title',''; select 'dbr.hidecolumns','cType';
select 'dbr.chart','Column','Line Clean Time Analysis';
select 'dbr.chart.options','rotateNames', 45;
select 'dbr.chart.options','chart.scale',80;
select 'dbr.chart.color','[bcolour]'; SELECT a.LC_FPO as "FPO #[FPO]",
time_to_sec(a.LC_TimeTaken)/3600 as "Time Taken[tTime]",
a.LC_CleanType as "Clean Type[cType]",
if(a.LC_CleanType=1,v_color1,if(a.LC_CleanType=2,v_color2,v_color3)) as "[bcolour]"
FROM tblLineClean a
left outer join schedule b on a.LC_FPO=b.`Order`
left outer join (select lab_fpono as lfpo, min(lab_date) as lDate from tbl_fpolab group by lab_fpono) f on a.LC_FPO=f.lfpo
where a.LC_Line=inLine
order by f.ldate,a.LC_FPO;
The value of [bcolour] will be 1,2, or 3 and depending on the value I'd like a different colour.
Is this possible?
Thanks
Jake