Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
585
Change the color of one Point in a Scatterchart
posted

Hello,

 got two Questions

1) Is it possible to change the color from one specific Point in a Scatterchart?

2) How can I format the content of the Labels I have when I move with the mouse over a Point in my Scatterchart? (numeric Format ###,###,###,##0.00 is what I would need) 

Thanks in advance for your help

 

Stefan 

  • 17605
    posted

    HI Stefan,

    you can try code like this:

    protected void Page_Load(object sender, EventArgs e)

    {

    this.UltraChart1.Data.DataSource = DemoTable.Table();

    this.UltraChart1.DataBind();

    this.UltraChart1.Tooltips.FormatString = "<DATA_VALUE:###,###,###,##0.00>";

    this.UltraChart1.FillSceneGraph += new Infragistics.UltraChart.Shared.Events.FillSceneGraphEventHandler(UltraChart1_FillSceneGraph);

    }

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

    {

    foreach (Primitive primitive in e.SceneGraph)

    {

    PointSet pointSet = primitive as PointSet;

    if (pointSet == null)

    {

    continue;

    }

    // you should find the right point in the pointSet.points collection

    DataPoint dataPoint = pointSet.points[0];

    Symbol symbol = new Symbol(dataPoint.point, pointSet.icon, pointSet.iconSize);

    symbol.PE.Fill = Color.Red;

    e.SceneGraph.Add(symbol);

    break;

    }

    }