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
135
line and Bar with secondary axis.
posted

Hi Team,

I'm new to Charts and using Infragistics 13.2. I'm trying to create a Graph with secondary axis from  Datatable.

Below are the columns

Date|TAT|Count

and I want to show chart as attached file. Can you please help me with sample how to get below with Ultrawinchart?

Parents
  • 6120
    Offline posted

    Hi Harish,

    I’m working on a sample that demonstrates how to achieve this look using UltraWinChart, I will post the sample on this thread by tomorrow, but the below information should get you started with your UltraChart.

    To create a secondary axis from a data table you have to create a Series object and assign your DataTable to it. For example you have to do something like this.

                DataTable dt = new DataTable();

                dt.Columns.Add("2007", typeof(int));

                dt.Columns.Add("2008", typeof(int));

                dt.Columns.Add("label", typeof(string));

                dt.Rows.Add(new object[] { 10, 15, "Month1" });

                dt.Rows.Add(new object[] { 20, 25, "Month2" });

                

                NumericSeries series1 = new NumericSeries();

                series1.Data.DataSource = dt;

                series1.Data.ValueColumn = "2007";

                series1.Data.LabelColumn = "label";

                chart.CompositeChart.Series.Add(series1); 

    To achieve this look for your chart you need to create a composite chart with two chart layers in it. One chart layer containing the Bar chart and another chart layer containing a Line chart. You can refer to the below link on how to create a composite chart using the Chart Wizard.

    http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Chart_Creating_a_Composite_Chart_Using_the_Chart_Wizard_Part_1_of_2.html http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Chart_Creating_a_Composite_Chart_Using_the_Chart_Wizard_Part_2_of_2.html

    Please let me know if you have any questions. 

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer, Windows Forms
    http://www.infragistics.com/

Reply Children
No Data