Sign in to follow this  
tessy790

Stacked chart problem

Recommended Posts

I am trying to create a stacked chart reading data from a database. I dont understand how to display all the data.

 

 

 

 

 

I have am testing it using one category which has three results (week 1, 20, 30, 40)

 

 

 

I've changed <> with {} so that I could get it showing up properly.

 

 

 

Do you have to loop through the database?

 

 

 

 

 

sql string is - string strSQL = "SELECT Student_kudos.points, Kudos.week, Kudos.Title FROM Kudos INNER JOIN Student_kudos ON Kudos.KudosID = Student_kudos.KudosID WHERE (Student_kudos.studentID = 'xxxxxx') AND (Student_kudos.status = 'true')AND Kudos.week ='1'order by Kudos.week";

 

 

 

strXML.AppendFormat("{chart palette='1' caption='Weekly Kudos Breakdown' shownames='1' showvalues='0' numberPrefix='$' showSum='1' decimals='0' overlapColumns='0'}");

 

strXML.AppendFormat("{categories}{category label='week 1'/}{/categories}");

 

strXML.AppendFormat("{dataset seriesName='1' showValues='0'}");

 

strXML.AppendFormat("{set value='{0}'/}", oRs.ReadData["points"].ToString());

 

strXML.AppendFormat("{set value='{0}'/}", oRs.ReadData["points"].ToString());

 

strXML.AppendFormat("{set value='{0}'/}", oRs.ReadData["points"].ToString());

 

strXML.AppendFormat("{/dataset}");

 

 

 

Thanks in advance

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this