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
Take a look at the following help articles for creating composite charts. As far as providing data to the series objects, it can work in bound or unbound mode as shown in the link:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Chart_Creating_a_Composite_Chart_in_Code_Part_1_of_2.html
Full set of articles for composite charts in documentation:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Chart_Creating_a_Composite_Chart.html
G'day Sung Kim,
Thanks for the info - I will let you know if i get into any trouble.
Are there any tutorials that show how to use a composite chart using DALs and BLLs? These charts are customer specific and on the page two parms are passed customerID and UtilityID so i have to take that into consideration too.
thanks
When using composite charts, only Series objects can be used to provide the chart data. In the above link, it shows how to use it in bound mode, to a DataTable or unbound, where you add items yourself.
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,
{
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"});
}
series.Label = "Fiscal\nMonth\n<SERIES_LABEL>";
// this code populates the series from an external data source
series.Data.DataSource = table;
series.Data.ValueColumn = "2008";
series.Data.LabelColumn = "Label Column";
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);
myColumnLayer.ChartArea = myChartArea;
myColumnLayer.AxisX = axisX;
myColumnLayer.AxisY = axisY;
myColumnLayer.Series.Add(seriesA);
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.
Hey Sung Kim,
It is building the graph but not in the order that I needed - I guess i am still missing somthing,'
NumericSeries series = new NumericSeries();
if (User.IsInRole("Administrator") || User.IsInRole("CustomerAdmin"))
NumericSeries seriesB = GetNumericSeriesBound2();
this.FiscalInputCostChart.CompositeChart.Series.Add(seriesA);
this.FiscalInputCostChart.CompositeChart.Series.Add(seriesC);
myColumnLayer.Series.Add(seriesB);
myColumnLayer.Series.Add(seriesC);
You are going to have to either invert your data, columns become rows and rows become columns, or make a series for each row.