I need to put a line graph on top of this graph - so i know it will be a composite but i am not sure how to create the series from a TableAdapter -
THis is the way i formated the Series for the Column Chart
ColumnChart.Axis.X.Labels.SeriesLabels.FormatString = "Fiscal\nMonth\n<SERIES_LABEL>";
Thanks
You are going to have to either invert your data, columns become rows and rows become columns, or make a series for each row.
Hey Sung Kim,
It is building the graph but not in the order that I needed - I guess i am still missing somthing,'
{
table.Columns.Add("2008", typeof(double));
table.Columns.Add("Fiscal_Month", typeof(string));
table.Rows.Add(new object[ {589199.8713,741965.9000,573754.2836,"2"});
table.Rows.Add(new object[ {543837.1542,707583.6500,1124153.0300,"4"});
table.Rows.Add(new object[ {645298.4217,666165.3000,null,"6"});
table.Rows.Add(new object[ {818392.0109,1022916.2200,null,"8"});
table.Rows.Add(new object[ {792058.6090,1124153.0300,null,"10"});
table.Rows.Add(new object[ {950394.0800,1043649.7800,null,"12"});
}
// this code populates the series from an external data source
series.Data.DataSource = table;
NumericSeries series = new NumericSeries();
if (User.IsInRole("Administrator") || User.IsInRole("CustomerAdmin"))
ChartArea myChartArea = new ChartArea();
AxisItem axisX = new AxisItem();
axisX.DataType = AxisDataType.String;
axisX.Labels.ItemFormatString = "<ITEM_LABEL>";
AxisItem axisY = new AxisItem();
axisY.DataType = AxisDataType.Numeric;
myChartArea.Axes.Add(axisX);
myChartArea.Axes.Add(axisY);
NumericSeries seriesB = GetNumericSeriesBound2();
this.FiscalInputCostChart.CompositeChart.Series.Add(seriesA);
this.FiscalInputCostChart.CompositeChart.Series.Add(seriesC);
myColumnLayer.ChartArea = myChartArea;
myColumnLayer.AxisX = axisX;
myColumnLayer.AxisY = axisY;
myColumnLayer.Series.Add(seriesA);
myColumnLayer.Series.Add(seriesB);
myColumnLayer.Series.Add(seriesC);
gcwatson said:series.Data.ValueColumn = "2007"; series.Data.ValueColumn = "2008"; series.Data.ValueColumn = "2009";
series.Data.ValueColumn =
You are setting the same property 3 times. Instead create 3 different series objects each with one of those ValueColumn settings.
Ok, need your help Sung Kim - bleow is the code i have and i cannot seem to get the format the same as the graph above.
Thanks,
series.Label = "Fiscal\nMonth\n<SERIES_LABEL>";
series.Data.ValueColumn = "2008";
series.Data.LabelColumn = "Label Column";