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
285
Hover annotation event
posted

hi

I have a composite chart with both line and column chart in it. I also have lineImage annotations added to the chart.

I would like to know if there is an event that will fire up when I hover one of these annotations

Thanks for your help in advance

Bakr

Parents
No Data
Reply
  • 28496
    Suggested Answer
    Offline posted

    there is not.  however, if you use the FillSceneGraph event, you can overlay Box primitives over the ChartImage primitives, and make the Box primitives raise the ChartDataClicked event.

            private void ultraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e)
            {
                PrimitiveCollection primitivesToAdd = new PrimitiveCollection();
                foreach (Primitive p in e.SceneGraph)
                {
                    ChartImage img = p as ChartImage;
                    if (img != null)
                    {
                        Box clickableBox = new Box(img.bounds);
                        clickableBox.Row = clickableBox.Column = 0;
                        clickableBox.Layer = e.ChartCore.GetChartLayer();
                        clickableBox.Caps = PCaps.HitTest;
                        clickableBox.Chart = this.ultraChart1.ChartType;
                        primitivesToAdd.Add(clickableBox);
                    }
                }
                e.SceneGraph.AddRange(primitivesToAdd.ToArray());
            }

Children