Infragistics Home

Infragistics Forums

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

Set PE.Fill for XYDataPoint

Last post 05-20-2008 9:40 by [Infragistics] Max Rivlin. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-30-2008 14:48

    Set PE.Fill for XYDataPoint

    I am using UltraChart 2007.1 and am setting the PaintElement for each data point as I create it, but all the points end up being rendered with the same fill instead of using different fills for each point. How can I set each point to use a different PaintElement?

    • Post Points: 20
  • 05-01-2008 12:27 In reply to

    Re: Set PE.Fill for XYDataPoint

    What chart type are you using? If it's a line chart, the color of the line is not based on the datapoint color, but instead uses the series.PE. Otherwise, i don't see why this wouldn't work. Can you post your code and show how you set colors on the points?

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

    • iveys1
    • Not Ranked
    • Joined on 05-15-2008
    • Points 20

    Re: Set PE.Fill for XYDataPoint

    I need to do the same thing.  I have a winforms app with a linechart, and i need to mark sections of the lines.  I've been trying to do this by setting the PE on the NumericDataPoint items that i'm putting hte series, but having no luck.  Is there a different chart type that I should be using instead?  I'm charting a series of numbers, so figured line chart with series data would be my best bet.

    Thanks,

    Scott

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

    Re: Set PE.Fill for XYDataPoint

    Sorry, it's not possible to color individual sections of the line in a line chart by just setting PaintElements. You have to handle FillSceneGraph event, find two data points on the line, create a new line that will overlay a section of the existing line and apply a paint element to that new line.

    private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)
    {
       Polyline line = null;
       foreach (Primitive p in e.SceneGraph)
       {
          if (p is Polyline)
          {
             //find the first available polyline.
             line = p as Polyline;
             break;
          }
       }
       if (line != null)
       {
          Line l = new Line(line.points[1].point, line.points[2].point);
          l.PE.Stroke =
    Color.Red;
          e.SceneGraph.Add(l);
       }
    }

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