Infragistics Home

Infragistics Forums

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

Change the data column sources in a PointChart3D graph

Last post 05-14-2008 17:16 by [Infragistics] David Negley. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-05-2008 11:00

    Change the data column sources in a PointChart3D graph

    Hi everyone, got a few questions :)

    First, I'm wondering how can one change the columns that get plotted in a PointChart3D. For example, I have a DataTable with 5 columns and I need to select which column gets plotted in any of the three axes (i.e. display column 4 in the X axis, then switch to the 5th, and so on).

    Second, what would be the best way to draw a circle overlay over a ScatterChart graph?

    Finally, how can I "center" the graphic, that is, have it's center always be (0,0) (as shown in the attached picture).

     Thanks in advance, -David

     

    • Post Points: 20
  • 05-07-2008 7:35 In reply to

    Re: Change the data column sources in a PointChart3D graph

    I'm not sure I understand your first question, but any time when you want to change the data you should do this manually.

    About your second and third questions, you can try the following code:

    private void Form1_Load(object sender, EventArgs e)

    {

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

    this.ultraChart1.Axis.X.RangeType = Infragistics.UltraChart.Shared.Styles.AxisRangeType.Custom;

    this.ultraChart1.Axis.X.RangeMin = -100;

    this.ultraChart1.Axis.X.RangeMax = 100;

    this.ultraChart1.Axis.X.MajorGridLines.Visible = false;

    this.ultraChart1.Axis.Y.RangeType = Infragistics.UltraChart.Shared.Styles.AxisRangeType.Custom;

    this.ultraChart1.Axis.Y.RangeMin = -100;

    this.ultraChart1.Axis.Y.RangeMax = 100;

    this.ultraChart1.Axis.Y.MajorGridLines.Visible = false;

    this.ultraChart1.Data.ZeroAligned = true;

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

    this.ultraChart1.DataBind();

    this.ultraChart1.FillSceneGraph += new Infragistics.UltraChart.Shared.Events.FillSceneGraphEventHandler(ultraChart1_FillSceneGraph);

    }

    void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)

    {

    IAdvanceAxis xAxis = e.Grid["X"] as IAdvanceAxis;

    int x = (int)(double)xAxis.Map(0);

    int x2 = (int)(double)xAxis.Map(100);

    IAdvanceAxis yAxis = e.Grid["Y"] as IAdvanceAxis;

    int y = (int)(double)yAxis.Map(0);

    int y2 = (int)(double)yAxis.Map(100);

    int width = x2 - x;

    int height = y - y2;

    Point leftTop = new Point(x - width, y - height);

    Point widthHeight = new Point(2 * width, 2 * height);

    Ellipse ellipse = new Ellipse(leftTop, widthHeight);

    e.SceneGraph.Add(ellipse);

    }

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

    Re: Change the data column sources in a PointChart3D graph

    Thanks for the reply :)

    Sadly, I'm using Infragistics version 7.1 which doesn't include the FillGraphEvent so I'll have to use a custom layer. I've tried some examples without success. Is there a chance to see working code for that problem but using a custom layer (inherit Layer or implement ILayer)?

     About my first question, I'll try to explain it better. I have a DataTable with say 10 columns, and I want to have a series of combos to change the displayed columns. For example, have a graph display the axes (X,Y,Z) from the columns (1,2,3), then (1,2,4), (4,6,8) and so on... that is, have the user select which columns he wants to display in the graph.

    • Post Points: 5
  • 05-09-2008 18:53 In reply to

    Re: Change the data column sources in a PointChart3D graph

     Bump

     P.D. I'm using Infragistics version 8.1 now.

    • Post Points: 20
  • 05-14-2008 17:16 In reply to

    Re: Change the data column sources in a PointChart3D graph

     you can use the chart.Data.IncludeColumn(n, false) method to exclude a column from plotting.

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