User (Legacy) Posted August 11, 2006 Report Share Posted August 11, 2006 Hello, I´ve got a datatable with three numeric columns. Additional there is a separat start and stoptime (NOT in the Datatable) This time should be on the X-Axis. I tried the following codesnipset but it don´t works :-( // Here I added a fieldmapping for the datatable. ChartFX.WinForms.FieldMap fieldMapPressure = new ChartFX.WinForms.FieldMap(); ChartFX.WinForms.FieldMap fieldMapTemperature = new ChartFX.WinForms.FieldMap(); ChartFX.WinForms.FieldMap fieldMapPulse = new ChartFX.WinForms.FieldMap(); fieldMapPressure.DisplayName = "Druck"; fieldMapPressure.Name = "Druck"; fieldMapPressure.Usage = ChartFX.WinForms.FieldUsage.Value; fieldMapTemperature.DisplayName = "Temperatur"; fieldMapTemperature.Name = "Temperatur"; fieldMapTemperature.Usage = ChartFX.WinForms.FieldUsage.Value; fieldMapPulse.DisplayName = "Pulse"; fieldMapPulse.Name = "Durchflu Link to comment Share on other sites More sharing options...
Software FX Posted August 12, 2006 Report Share Posted August 12, 2006 You are not supplying X-Values to this chart. I believe what you want to do is: DateTime start = new DateTime(2005, 6, 18); DateTime date = start; for (int i = 0; i < 20; i++) { chart.Data.X[i] = date.ToOADate(); // Assing X values here date = date.AddMinutes(10); } -- Francisco Padron www.chartfx.com "Holger Schaefer" <stuff@ingenieurdienstleistungen.de> wrote in message news:BF5mfNWvGHA.2572@webserver3.softwarefx.com... > Hello, > > I´ve got a datatable with three numeric columns. > Additional there is a separat start and stoptime (NOT in the Datatable) > This time should be on the X-Axis. > I tried the following codesnipset but it don´t works :-( > > > // Here I added a fieldmapping for the datatable. > ChartFX.WinForms.FieldMap fieldMapPressure = new > ChartFX.WinForms.FieldMap(); > ChartFX.WinForms.FieldMap fieldMapTemperature = new > ChartFX.WinForms.FieldMap(); > ChartFX.WinForms.FieldMap fieldMapPulse = new ChartFX.WinForms.FieldMap(); > > > fieldMapPressure.DisplayName = "Druck"; > fieldMapPressure.Name = "Druck"; > fieldMapPressure.Usage = ChartFX.WinForms.FieldUsage.Value; > > fieldMapTemperature.DisplayName = "Temperatur"; > fieldMapTemperature.Name = "Temperatur"; > fieldMapTemperature.Usage = ChartFX.WinForms.FieldUsage.Value; > > fieldMapPulse.DisplayName = "Pulse"; > fieldMapPulse.Name = "Durchflu Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 16, 2006 Author Report Share Posted August 16, 2006 Hello, > You are not supplying X-Values to this chart. I believe what you want to do > is: > > DateTime start = new DateTime(2005, 6, 18); > DateTime date = start; > > for (int i = 0; i < 20; i++) > { > chart.Data.X[i] = date.ToOADate(); // Assing X values here > date = date.AddMinutes(10); > } thats rigth but I tried this before and got an DivideByZero Exception deep in paint. In the meantime I´ve found the problem. Every time I set ´this.chart.AxisX.LabelsFormat.Format = AxisFormat.DateTime;´ to any value I got this Exception. Now I know this was caused by setting ´this.chart.MainPane.Visible = false;´ Everything works fine now thanks for your help. Kind regards Holger Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.