Welcome to the Xceed Community | Help
Community Search  
More Search Options

Set different color for some points in a PointSeries in XYZ Scatter chart

Sort Posts: Previous Next
  •  04-16-2009, 7:07 AM Post no. 20299

    Set different color for some points in a PointSeries in XYZ Scatter chart

    Hi all,
    Is it possible to set each point in a single PointSeries with different color in XYZ Scatter chart?

    I try to do that with the AddPoint(Double,Double,Double,String,FillEffect), which is described here.
    Here is how I use it:
        PointSeries pointSeries = (PointSeries)chart1.Series.Add(SeriesType.Point);
        foreach(var data in dataPoints)
        {
           FillEffect fill = new FillEffect() {Type = FillEffectType.Color};
           fill.SetSolidColor(randomColor());
           pointSeries.AddPoint(data.xValue, data.yValue, data.zValue,"",fill);
        }
    
    but the result is all the same default red color in appearance.
    Filed under:
  •  04-16-2009, 2:55 PM Post no. 20317 in reply to 20299

    Re: Set different color for some points in a PointSeries in XYZ Scatter chart

    You must set the FillMode property to DataPoints for this to work.

    e.g.:

          pointSeries.Appearance.FillMode = AppearanceFillMode.DataPoints;


    André
    Software Developer
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.