I've actually made some progress on this but cannot get the chart to recognize the data...
The DataSet has the following:
day_of_week_short_desc value_wtd
Mon 8.00
Tue 28.00
Wed 47.00
Thu 55.00
Fri 100.00
day_of_week_short_desc is the x-axis and value_wtd is the y-axis
I'm trying to create a chart. The chart seems to realize that the data is there but the x/y axes and plotting is not correct.
Here is the code that I am using:
ChartSeries series1 = new ChartSeries(" Unit Sales ");
series1.Type = ChartSeriesType.Scatter;
ChartDataBindModel dataSeriesModel = new ChartDataBindModel(unitSalesKPI, "unit_sales_kpi");
series1.SeriesModel = dataSeriesModel;
ChartWebControl1.Series.Add(series1);
ChartDataBindAxisLabelModel dataLabelsModel = new ChartDataBindAxisLabelModel(unitSalesKPI, "unit_sales_kpi");
dataLabelsModel.LabelName = "Name"; //"day_of_week_short_desc";
ChartWebControl1.PrimaryXAxis.LabelsImpl = dataLabelsModel;
this.ChartWebControl1.Series[0].ScatterConnectType = ScatterConnectType.Line;
I have attached a picture of the chart that is being produced.
Please advise,
Thank you
chart_6a5edd2d.bmp