stacked bar chart order issue
lakeFeb 16 2011 — edited Feb 16 2011I am definitely missing something here.
I have a stacked flash bar chart which displays 3 types of counts per year_month. I cannot get the bars in the correct order.
It's mostly correct except for 2 bonkers cases where it puts 2005_12 and 2006_01 to the right of
2011_01 . I cannot figure out what causes this. There is a peculiarity involving those 2 year_months in that every other
year_month had > 0 number of the first type of count except these 2 which solely had the second type of count.
But how this translates into an order issue I have no idea. The query orders the data by year_month.
Any ideas?
the last part of the query is:
select null LINK, (a.YEAR_MONTH) "LABEL", b.OVERNIGHTS,c.DAYTIMES,d.NAPS from
year_months a, myovernights b, mydaytimes c, mynaps d
where a.yearmonth < to_char(sysdate,'YYYYMM') and
a.year_month = b.year_month(+) and
a.year_month = c.year_month(+) and
a.year_month = d.year_month(+) order by a.YEAR_MONTH
year_months is a view with 2 fields:
year_month varchar2(7) (yyyy_mm)
yearmonth number(6) (yyyymm)
and contains all the year_months from our time 0 up to 2020.