Stacked Bar in Dashboard | jfree stacked bar chart

The basic requirement is that the SQL query should return three columns
for e.g.
select Format(date,’YYMM’) & ‘ - ‘& Format(date,’MMM’) as Month , switch(class is null,’Unknown Class’,class is not null,class) as class_type, sum(amount) as Expense
from
[qb_data$]
where “Account Type” = ‘Expense’
and date between #10/1/2007# and #05/23/2008#
and class like ‘%’
group by Format(date,’YYMM’) & ‘ - ‘& Format(date,’MMM’), switch(class is null,’Unknown Class’,class is not null,class)
order by 1 asc
(Complete Steps) Create Stacked Bar chart in dashboard