pass in false instead of true for the 4th argument in the XYDataPoint constructor.
Hi, thanks for picking this thread up. I have used your suggestions and got a bit further. Now it compiles and runs successfully, however the graph is empty. I am not sure if I have got the bounds wrong or colors are white or if I'm still having trouble actually adding data.
I have paraphrased my code below. Three lines each with multiple points. Can anyone see my mistake(s)?
tia.
Defining the chart:
this.Chart.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ScatterChart; XYSeries mySeries = new XYSeries(); for (int i = 0; i < 3; i++) {this.Chart.Series.Add(mySeries); }this.Chart.Axis.X.RangeMax = (double)1; this.Chart.Axis.X.RangeMin = (double) 0;this.Chart.Axis.Y.RangeMax = 50; this.Chart.Axis.Y.RangeMin = 0;this.Chart.ScatterChart.UseGroupByColumn = true; this.Chart.ScatterChart.GroupByColumn = 3;this.Chart.ScatterChart.ColumnX = 0; this.Chart.ScatterChart.ColumnY = 1; this.Chart.ScatterChart.ConnectWithLines = true;
this.Chart.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ScatterChart;
{
}
this.Chart.Axis.X.RangeMin = (double) 0;
this.Chart.Axis.Y.RangeMin = 0;
this.Chart.ScatterChart.GroupByColumn = 3;
this.Chart.ScatterChart.ConnectWithLines = true;
rowData = new ArrayList[3]; xys = new XYSeries[3];for (int i = 0; i < 3; i++) {xys[i] = new XYSeries(this.Chart); for (int j = 0; j < 4; j++) {xys[i].Points.Add(new XYDataPoint(0, 0, "BM"+i, true)); }this.Chart.Series[i] = xys[i]; }
xys = new XYSeries[3];
Refresh Data ...(called within an while loop)
xys[BM_id].Points.Clear();
for (int i = 0; i < 4; i++) {x = Convert.ToDouble(i / 4); y = Convert.ToDouble(i*i*rnd.Next(0,10));xys[BM_id].Points.Add(new XYDataPoint(x, y, "BM" + BM_id.ToString(), true)); } this.Chart.Series[BM_id] = xys[BM_id]; this.Chart.DataBind();
y = Convert.ToDouble(i*i*rnd.Next(0,10));
this.Chart.Series[BM_id] = xys[BM_id];
this.Chart.DataBind();
this.Chart.ScatterChart.ColumnY = 1;
for (int j = 0; j < 4; j++)
if you have multiple lines, the best way to define the table is like this:
GroupByColumn (string) ; ColumnX (double) ; ColumnY (double)
Line A ; 1 ; 1
Line A ; 1 ; 2
Line A ; 1 ; 3
Line B ; 1 ; 1
Line B ; 2 ; 1
Line B ; 3 ; 1
then set ScatterChart.UseGroupByColumn = true, ScatterChart.GroupByColumn = 0, ScatterChart.ColumnX = 1, ScatterChart.ColumnY = 2, ScatterChart.ConnectWithLines = true