Mixed Charts
Posted: Wed Dec 09, 2015 7:30 am
Hi,
There is a bug when modifying the second series in a mixed chart... (See code below). Cht1 is not changing the fillcolor on my second series (The area series). I can only do this by changing changing the color in element 1 (see cht2)
wfcreate(wf = "", page = "Monthly") m 1900 2020
pageselect monthly
smpl @all
series wdearnyoy=5
series wdexpyoy=4
smpl 1990 2015
group g wdearnyoy wdexpyoy
freeze(cht1) g.mixed line(wdearnyoy) area(wdexpyoy)
cht1.addtext(t) ""
cht1.setelem(1) axis(l) legend("Series 1") axis(l) symbol(15) linepattern(1) linewidth(1.0) linecolor(0,80,47) fillcolor(0,80,47)' fillcolor(205,198,179) uncommenting this is the only way to change the fillcolor on series 2
cht1.setelem(2) axis(l) legend("Series 2") symbol(15) linepattern(2) linewidth(1.5) linecolor(205,198,179) fillcolor(205,198,179) 'this line has no effect on series 2
cht1.legend +display position(0.4,-0.33) +inbox
freeze(cht2) g.mixed line(wdearnyoy) area(wdexpyoy)
cht2.addtext(t) ""
cht2.setelem(1) axis(l) legend("Series 1") axis(l) symbol(15) linepattern(1) linewidth(1.0) linecolor(0,80,47) fillcolor(205,198,179)
cht2.setelem(2) axis(l) legend("Series 2") symbol(15) linepattern(2) linewidth(1.5) linecolor(205,198,179) fillcolor(205,198,179) 'this line has no effect on series 2
cht2.legend +display position(0.4,-0.33) +inbox
There is a bug when modifying the second series in a mixed chart... (See code below). Cht1 is not changing the fillcolor on my second series (The area series). I can only do this by changing changing the color in element 1 (see cht2)
wfcreate(wf = "", page = "Monthly") m 1900 2020
pageselect monthly
smpl @all
series wdearnyoy=5
series wdexpyoy=4
smpl 1990 2015
group g wdearnyoy wdexpyoy
freeze(cht1) g.mixed line(wdearnyoy) area(wdexpyoy)
cht1.addtext(t) ""
cht1.setelem(1) axis(l) legend("Series 1") axis(l) symbol(15) linepattern(1) linewidth(1.0) linecolor(0,80,47) fillcolor(0,80,47)' fillcolor(205,198,179) uncommenting this is the only way to change the fillcolor on series 2
cht1.setelem(2) axis(l) legend("Series 2") symbol(15) linepattern(2) linewidth(1.5) linecolor(205,198,179) fillcolor(205,198,179) 'this line has no effect on series 2
cht1.legend +display position(0.4,-0.33) +inbox
freeze(cht2) g.mixed line(wdearnyoy) area(wdexpyoy)
cht2.addtext(t) ""
cht2.setelem(1) axis(l) legend("Series 1") axis(l) symbol(15) linepattern(1) linewidth(1.0) linecolor(0,80,47) fillcolor(205,198,179)
cht2.setelem(2) axis(l) legend("Series 2") symbol(15) linepattern(2) linewidth(1.5) linecolor(205,198,179) fillcolor(205,198,179) 'this line has no effect on series 2
cht2.legend +display position(0.4,-0.33) +inbox