Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Composite Chart data values (column/line)
posted

In following the steps given on the web site below, I am able to generate a chart, but only with the axis value I entered in the wizard, but I am wanting to use the values from a data source. I must be missing something very simple. I have added a data source, but values not there. Help please?

http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Chart_Creating_a_Composite_Chart_Using_the_Chart_Wizard_Part_1_of_2.html

http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Chart_Creating_a_Composite_Chart_Using_the_Chart_Wizard_Part_2_of_2.html

Parents Reply
  • 310
    posted in reply to Max Rivlin [Infragistics]

    G'day Max

    Currently i have a graph - see image - that is created from a query in a DAL and then 2 paramertors are passed - customer, and the other from a control on the page - this displays fine - however, i am now tyring it create it with a line graph on top - therefore using the composite graph - i am just haveing trouble getting the Numeric Series to see the datasource.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    this.FiscalInputCostChart.ChartType = ChartType .Composite;

    ChartArea myChartArea = new ChartArea();

     

     

    this.FiscalInputCostChart.CompositeChart.ChartAreas.Add(myChartArea);

     

     

    AxisItem axisX = new AxisItem();

    axisX.OrientationType =

     

    AxisNumber .X_Axis;

    axisX.DataType =

    AxisDataType.String;

    axisX.SetLabelAxisType = 

    SetLabelAxisType .GroupBySeries;

    axisX.Labels.ItemFormatString =  "

    Fiscal\nMonth\n<SERIES_LABEL>";

    axisX.Labels.Orientation =

    TextOrientation.VerticalLeftFacing;

     

     

    AxisItem axisY = new AxisItem();

    axisY.OrientationType =

    AxisNumber.Y_Axis;

    axisY.DataType =

    AxisDataType.Numeric;

    axisY.Labels.ItemFormatString =

    "<DATA_VALUE:0.#>";

    myChartArea.Axes.Add(axisX);

    myChartArea.Axes.Add(axisY);

     

     

    ChartLayerAppearance myColumnLayer = new ChartLayerAppearance();

    myColumnLayer.ChartType =

    ChartType.ColumnChart;

    myColumnLayer.ChartArea = myChartArea;

    myColumnLayer.AxisX = axisX;

    myColumnLayer.AxisY = axisY;

     

     

    //myColumnLayer.Series.Add(series);

     

     

     

    NumericSeries seriesColumn1 = new NumericSeries();

    seriesColumn1.Data.DataSource = odsInput;

    seriesColumn1.Data.LabelColumn =

    "Fiscal_Month";

    seriesColumn1.Data.ValueColumn =

    "2007";

     

     

    NumericSeries seriesColumn2 = new NumericSeries();

    seriesColumn2.Data.DataSource = odsInput;

    seriesColumn2.Data.LabelColumn =

    "Fiscal_Month";

    seriesColumn2.Data.ValueColumn =

    "2008";

     

     

    NumericSeries seriesColumn3 = new NumericSeries();

    seriesColumn3.Data.DataSource = odsInput;

    seriesColumn3.Data.LabelColumn =

    "Fiscal_Month";

    seriesColumn3.Data.ValueColumn =

    "2009";

    Trying to get the data source this way

     

     

     

     

     

     

     

     

    private void RetrieveBudgetData_Load(int Customer_Id, int Utility_Id)

    {

     

     

    InputCostTableAdapter ta = new InputCostTableAdapter();

     

     

    DataTable dt = new DataTable();

    dt.Columns.Add(

    "Fiscal_Month", typeof(string));

    dt.Columns.Add(

    "2007", typeof(int));

    dt.Columns.Add(

    "2008", typeof(int));

    dt.Columns.Add(

    "2009", typeof(int));

    I would really appreciate your direction on this.

Children