Home Forums WinForms controls Xceed Chart for WinForms Set different color for some points in a PointSeries in XYZ Scatter chart

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19101 |

    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.

    Imported from legacy forums. Posted by Chen Yu (had 2018 views)

    User (Old forums)
    Member
    Post count: 23064

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

    e.g.:

          pointSeries.Appearance.FillMode = AppearanceFillMode.DataPoints;

    Imported from legacy forums. Posted by André (had 2390 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.