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
227
Ultra chart : On mousemove the customized Legend Tooltip is not worked on scrollbar is enabled (enablescrollbar = true)
posted

Hi,

I have tried to provide a tool tip in legend area on mouse move event and it was created in the fillscenegraph event.

Also, the selection of the chart type is "Line Chart" and the application platform is .Net Framework 3.5 & Infragistics version is 2009.1

Below code is used to customize the legend area,

private Primitive LastPrimitive { get; set; }
    void UltraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)
    {
        PrimitiveCollection primitivesToAdd = new PrimitiveCollection();
        foreach (Primitive p in e.SceneGraph)
        {
            if (p.Path != null && p.Path.Contains("Legend"))
            {
               p.Layer = e.ChartCore.GetChartLayer();
                if (p is Box)
                {
                    this.LastPrimitive = p;
               
                }
                else if (p is Text)
                {
                    Text t = (Text)p;
                    p.Row = 0;
                    p.Column = 0;
                    p.Value = this.LastPrimitive.Value;
                    Box newBox = new Box(t.bounds);
                    newBox.PE.FillOpacity = newBox.PE.StrokeOpacity = 0;
                    newBox.Row = p.Row;
                    newBox.Column = p.Column;
                    newBox.Chart = p.Chart;
                    newBox.Layer = p.Layer;
                    newBox.Value = p.Value;
                    newBox.Caps = PCaps.HitTest | PCaps.Skin | PCaps.Tooltip;
                    primitivesToAdd.Add(newBox);
                }
            }
        }
        e.SceneGraph.AddRange(primitivesToAdd.ToArray());
    }

When the mouse moves on legend area, the tool tip displays without issues and if the scrollbar is disabled.

But, the same is not displaying on while setting the property EnableScrollbar = true.

Please assist us to overcome from this issue.


Thanks in advance and hope will wait for the quick response.


Best regards,

Rithanya


 


Parents Reply Children