Evaluation copy of 5.1 - I am trying to bind data from a dataset and its freakn' confusing the hell out of me.
I am following this sample to a "T"
http://websamples.syncfusion.com/docs/chart/ug/DataBinding.htmlWHAT IS THE "TRICK" to get this to work!?!?!
DataSet set = new DataSet();
SqlDataAdapter sa = new SqlDataAdapter(cmd);
sa.Fill(set, "Projects");
ChartDataBindModel model = null;
ChartDataBindAxisLabelModel xAxisLabelModel = null;
model = new ChartDataBindModel(set, "Projects");
// The column that contains the X values.
model.XName = "ID";
// The columns that contain the Y values.
model.YNames = new string[] { "Population" };
ChartSeries series = this.ChartWebControl1.Model.NewSeries("Data Bound Series");
series.Text = series.Name;
series.SeriesModelImpl = model;
series.Style.TextColor = System.Drawing.Color.White;
series.Style.Font.Bold = true;
this.ChartWebControl1.Series.Add(series);
xAxisLabelModel = new ChartDataBindAxisLabelModel(set, "Projects");
// The columns that has the label values for the corresponding X values.
xAxisLabelModel.LabelName = "City";
ChartWebControl1.PrimaryXAxis.LabelsImpl = xAxisLabelModel;
ChartWebControl1.PrimaryXAxis.ValueType = ChartValueType.Custom;
wtf.zip