gdeutsch Posted June 29, 2010 Report Share Posted June 29, 2010 The xValue labels does not match the data. The chart is a barchart The xvlaue is a datetime The first bar label has the second bar label value , and so on. The chart appears with the last bar without label Quote Link to comment Share on other sites More sharing options...
RandyJ Posted June 29, 2010 Report Share Posted June 29, 2010 Hi, Could you please post a sample application that we can use to replicate this behavior? Thanks, Quote Link to comment Share on other sites More sharing options...
gdeutsch Posted June 29, 2010 Author Report Share Posted June 29, 2010 data: Conteo Fecha 346 24/09/2008 09:03:25 a.m. 291 25/09/2008 12:00:04 a.m. 275 26/09/2008 12:00:34 a.m. 270 27/09/2008 12:00:13 a.m. 268 28/09/2008 06:28:31 p.m. 269 29/09/2008 12:00:24 a.m. From a database query to a dataset: strsql="Query to obtain data" TrysqlCmd = New SqlCommand(strSql, sqlConn) sqlCmd.CommandType = CommandType.Textsqlda = New SqlDataAdapter(sqlCmd) dsGeneral = New DataSetsqlda.Fill(dsGeneral, "Porcentaje")Catch Ex As SqlException Cursor.Current = Cursors.Default DisplaySQLErrors(Ex, strSql) Exit Sub End TrysqlCmd = Nothingsqlda = NothingChart1.Data.Clear() Chart1.DataSourceSettings.Fields.Clear() If dsGeneral.Tables("Porcentaje").Rows.Count <> 0 Then Chart1.LegendBox.Titles.Clear()Chart1.LegendBox.Titles.Add(New TitleDockable("Asistencia")) Chart1.DataSourceSettings.Fields.Add( New FieldMap("Fecha", FieldUsage.XValue))Chart1.DataSourceSettings.Fields.Add(New FieldMap("Conteo", FieldUsage.Value)) Chart1.DataSource = dsGeneral.Tables("Porcentaje") End If Quote Link to comment Share on other sites More sharing options...
gdeutsch Posted June 29, 2010 Author Report Share Posted June 29, 2010 Chart image http://paradisetown.5u.com/cgi-bin/i/Chart1.jpg Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.