Page 1 of 1

graph mixed option

Posted: Thu Sep 30, 2021 5:25 pm
by Elderfield.A
Hi,

I am creating a stacked bar chart, with a line added. I do this using the mixed option. However, I want to create an add-in that takes a group object and then creates a mixed graph, using the last element in the group as the line. Add-in aside, is there a way to do this?

Essentially, I want to have this part automatically filled in for me based on the number of group elements

Code: Select all

group dumdat 1 2 3 4 5 6 7 8 freeze(test) dumdat.mixed stackedbar(1,2,3,4,5,6,7) line(8)
Where stackedbar(1,2,3,4,5,6,7) would automatically be 1 to (n-1) elements and line(8) is the nth element in group.

Any pointers?

Re: graph mixed option

Posted: Thu Sep 30, 2021 6:43 pm
by EViews Gareth
Something like:

Code: Select all

!n = dumdat.@count %stk = "" for !i=1 to !n-1 %stk = %stk + "," + @str(!i) next %lne = @str(!n) freeze(test) dumdat.mixed stackedbar({%stk}) line({%lne})

Re: graph mixed option

Posted: Thu Sep 30, 2021 7:24 pm
by Elderfield.A
Thanks for the speedy reply! Exactly what I was after!