Sign in to follow this  

Please Help

Recommended Posts

i try to do some different charts with and really data to show in my company for try to buy the soft for our intranet. I did a pie 3d and all work ok but now i have a big problem because i need a stacked chart, i make my code help me with source on internet. I have a similar source that a code that run ok but my code not run correctly i receive the message "no data to display"..please i need help thanks...this is my source


clsMain obj = new clsMain();


DataTable objDt = obj.GetEstadistica_EstadosTipoPedido();


#region GeneraGrafico


StringBuilder xmlData = new StringBuilder();


xmlData.Append("<chart caption='Sales' numberPrefix='$' formatNumberScale='0'>");


#region Crea el eje de tipos de pedido




DataTable dtTiposPedido = objDt.DefaultView.ToTable(true, "tipopedido");


foreach (DataRow Row in dtTiposPedido.Rows)




xmlData+= "<tipopedido name='" + Row["tipopedido"].ToString().Trim() + "' />";








#region Crea el eje de estados


DataTable dtEstados = objDt.DefaultView.ToTable(true, "estadodesc");


DataView objDv = objDt.DefaultView;


foreach (DataRow Row in dtEstados.Rows)




xmlData.Append("<dataset seriesName='" + Row["estadodesc"].ToString().Trim() + "'>");


foreach (DataRow Row2 in dtTiposPedido.Rows )




objDv.RowFilter = "tipopedido='" + Row2["tipopedido"].ToString().Trim() + "' and estadodesc='" + Row["estadodesc"].ToString().Trim() + "'";


if (objDv.Count > 0)


xmlData.AppendFormat("<set value='{0}' />", objDv[0]["cantidad"].ToString());




xmlData.AppendFormat("<set value='{0}' />", "1");














Literal1.Text = FusionCharts.RenderChart("Charts/StackedColumn3D.swf", "", xmlData.ToString(), "EstadosTipoPedido", "600", "300", false, true);


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