Uchi

How To Use Multi-Series 3D Column Chart

Recommended Posts

Hi,

I am trying to create multi-series column chart and i am having problem creating this simple chart. I want to use the GroupCategory field as Series names and i also want to use the Date field as the Category and TotalCount field is the value. How can i create such multi-series column chart? please help as i am strugling with this. thanks. Here is my code:


public string CreateHistoricalChart()
   {
       SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString);
       string sqlStatement = "select Date,  GroupCategory,  COUNT(Status)TotalCount from MainTable group by  Date, GroupCategory";
       SqlCommand cmd = new SqlCommand(sqlStatement, con);
       con.Open();
       SqlDataReader reader = cmd.ExecuteReader();
       string strXML;
       strXML = "<graph decimalPrecision='0' name='MyXScaleAnim' type='ANIMATION' duration='1' start='0' param='_xscale' showNames='1' labelDisplay='Rotate' useEllipsesWhenOverflow='1'  pieSliceDepth='30' formatNumberScale='0'>";

       while (reader.Read())
       {
           strXML += "<set name='" + reader["Date"].ToString() + reader["GroupCategory"].ToString() + "' value='" + reader["TotalCount"].ToString() + "' />";
       }
       strXML += "</graph>";
       return FusionCharts.RenderChart("../FusionCharts/Column3D.swf", "ChartID", strXML, "FactorySum6", "870", "350", false, true);

   }

 

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Welcome to FusionCharts Forum!

 

Apologies for the delayed response.

 

Could you please paste your generated chart XML here?

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