Trying that again (Google Chrome and Forum are not friends)
Hi all, I am having a hard time figuring out how to setup and populate a scatterlinechart. I am working within a chartfactory that currently produces BarCharts and areacharts by passing a DataRow object to the UpdateChart method. I have many XY points on each 'line' and expect to plot 2 lines. Any help greatly appreciated. thx
InitializeChart() case Shared.EChartType.Scatter: this.Chart.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ScatterLineChart; this.dataSetMonitorSailMap.Tables.Clear(); this.dataSetMonitorSailMap.Tables.Add(); this.dataSetMonitorSailMap.Tables[0].Clear(); { this.dataSetMonitorSailMap.Tables[0].Columns.Add("ColumnX", typeof(double)); this.dataSetMonitorSailMap.Tables[0].Columns.Add("ColumnY", typeof(double)); ...
InitializeRowData() case Shared.EChartType.Scatter: //rowData is an empty ArrayList[2] object // Add Row(s) to DataSet Table rowData[0] = new ArrayList(); rowData[1] = new ArrayList();
for (int i = 0; i < sensorCount; i++) { rowData[0].Add((double)i); rowData[1].Add((double)i); }
row = this.dataSetMonitorSailMap.Tables[0].NewRow(); row.ItemArray = rowData[0].ToArray(); this.dataSetMonitorSailMap.Tables[0].Rows.Add(row); row = this.dataSetMonitorSailMap.Tables[0].NewRow(); row.ItemArray = rowData[1].ToArray(); this.dataSetMonitorSailMap.Tables[0].Rows.Add(row);...
UpdateChart(){????}
possibly you should try using a ScatterChart with ScatterChart.ConnectWithLines set to True ... instead of a ScatterLineChart.
i'm not sure what you're asking here, though. have you tried creating a chart from this data? if so, does it render OK, do you get an error, or just unexpected results?