Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Flip Column 3d Chart

Last post 05-21-2008 3:37 by [Infragistics] Teodor Taushanov. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 05-15-2008 15:57

    • cgoodman
    • Top 150 Contributor
    • Joined on 05-06-2008
    • Points 335

    Flip Column 3d Chart

    How do I rotate a 3d Cylinder Column Chart 90 degrees clockwise?

    • Post Points: 20
  • 05-16-2008 9:33 In reply to

    • cgoodman
    • Top 150 Contributor
    • Joined on 05-06-2008
    • Points 335

    Re: Flip Column 3d Chart

     Thank you.  I was able to work things around and get the layout I want.  But, now the chart comes up really small.  I need to stretch the columns to the right (my chart is now sideways from left to right), but I don't want to make the control any taller.  I also needed to set the scale to 50 so the chart won't cover up my top and bottom titles.  How do I stretch the columns to the right without making the control any taller?

    • Post Points: 20
  • 05-16-2008 9:58 In reply to

    Re: Flip Column 3d Chart

    You can try using:

    this.ultraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.CylinderBarChart3D;

    so in this case you probably won't need to rotate the chart.

    Also you can scale the chart with:

    this.ultraChart1.Transform3D.Scale = 50;

    Best regards,
    Teodor Taushanov
    • Post Points: 20
  • 05-16-2008 13:52 In reply to

    • cgoodman
    • Top 150 Contributor
    • Joined on 05-06-2008
    • Points 335

    Re: Flip Column 3d Chart

     Thank you.  This was certainly easier... but I have another question, and hopefully my last for  a while. :-D  My Y axis labels are not showing (Y axis after changing the chart type).  How do I force these to show?  Or, since my z and y axis labels are the same, make my z axis labels switch to the other side.  I am enclosing a pic of my graph.  I basically want the labels on the right to be on the left. 

    • Post Points: 20
  • 05-17-2008 4:51 In reply to

    Re: Flip Column 3d Chart

    I tried:

    this.ultraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.CylinderBarChart3D;

    this.ultraChart1.DataSource = DemoTable.AllPositive();

    this.ultraChart1.DataBind();

    and it seems to work as you expect. You can try reseting the settings that you changed before.

    Best regards,
    Teodor Taushanov
    • Post Points: 20
  • 05-20-2008 9:52 In reply to

    • cgoodman
    • Top 150 Contributor
    • Joined on 05-06-2008
    • Points 335

    Re: Flip Column 3d Chart

     Then perhaps it's my data.  I build my datatable on the fly.  Two columns, first is System.String, second is System.Decimal.  Then I add 5 rows...

     

            System.Data.DataTable dt = new DataTable();
            System.Data.DataColumn col = new DataColumn("one",typeof(System.String));
            System.Data.DataColumn col2 = new DataColumn("two",typeof(System.Decimal));

            dt.Columns.Add(col);
            dt.Columns.Add(col2);

            System.Data.DataRow row1 = dt.NewRow();
            System.Data.DataRow row2 = dt.NewRow();
            System.Data.DataRow row3 = dt.NewRow();
            System.Data.DataRow row4 = dt.NewRow();
            System.Data.DataRow row5 = dt.NewRow();
            System.Data.DataRow row6 = dt.NewRow();
            System.Data.DataRow row7 = dt.NewRow();
            System.Data.DataRow row8 = dt.NewRow();

            row1[0] = "First";
            row2[0] = "Second";
            row3[0] = "Third";
            row4[0] = "Fourth";
            row5[0] = "Fifth";
            row6[0] = "Sixth";
            row7[0] = "Seventh";
            row8[0] = "Eighth";

            row1[1] = 20;
            row2[1] = 50;
            row3[1] = 30;
            row4[1] = 80;
            row5[1] = 54;
            row6[1] = 63;
            row7[1] = 77;
            row8[1] = 16;

            dt.Rows.Add(row1);
            dt.Rows.Add(row2);
            dt.Rows.Add(row3);
            dt.Rows.Add(row4);
            dt.Rows.Add(row5);
            dt.Rows.Add(row6);
            dt.Rows.Add(row7);
            dt.Rows.Add(row8);

            colChart.Data.DataSource = dt;
            colChart.Data.DataBind();
            colChart.Data.IncludeColumn(0,false);

            colChart.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.CylinderBarChart3D;

     

    The data coming in is not is a table form and I have to create the datatable in this manner.  Is there something else that I can do differently?

    • Post Points: 20
  • 05-20-2008 10:49 In reply to

    Re: Flip Column 3d Chart

    Answer

    Try adding:

    colChart.Data.SwapRowsAndColumns = true;

    Best regards,
    Teodor Taushanov
    • Post Points: 20
  • 05-20-2008 11:45 In reply to

    • cgoodman
    • Top 150 Contributor
    • Joined on 05-06-2008
    • Points 335

    Re: Flip Column 3d Chart

     That did it.  Thank you very much, now I need to work out how to make each cylinder different colors... but I'll not ask the question right now!!  Thanks for being patient with this newbie.

    • Post Points: 5
  • 05-20-2008 15:28 In reply to

    • cgoodman
    • Top 150 Contributor
    • Joined on 05-06-2008
    • Points 335

    Re: Flip Column 3d Chart

    OK.  I give up.  I don't have enough time to explore all the options.  Now, since I swapped columns and rows, since I only have one set of cylinders, they are all the same color (green).  How do I set the color of each cylinder individually, or is there a setting I can use to make this happen?  I've also been told that I need to control the spacing between the cylinders.  I will need to add 5 more cylinders to my chart, and then group them by twos.  This will be used to show comparisons.  An example would be that I have two cylinders, a "wide" gap, and then two more cylinders, then another gap...  I would end up with five groups of two cylinders.  Is this possible?

    • Post Points: 20
  • 05-21-2008 3:37 In reply to

    Re: Flip Column 3d Chart

    About your first questions - you can try:

    ultraChart1.ColorModel.ModelStyle = Infragistics.UltraChart.Shared.Styles.ColorModels.CustomSkin;

    ultraChart1.ColorModel.Skin.ApplyRowWise = false;

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.Yellow));

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.Green));

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.Gray));

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.Red));

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.Blue));

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.GreenYellow));

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.Indigo));

    ultraChart1.ColorModel.Skin.PEs.Add(new PaintElement(Color.LightSteelBlue));

    About your second question you probably need to look at our chart sampes (http://samples.infragistics.com/) to decide which chart type you want.

     

     

    Best regards,
    Teodor Taushanov
    • Post Points: 5
Page 1 of 1 (11 items)
Powered by Community Server (Commercial Edition), by Telligent Systems