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
160
In FillSceneGraph(...) Event Handler, e.Grid is null?
posted

Hi there,

 I want to do something about my x-axis (CompositeChart with a ColumnChart Layer and a LineChart Layer): set its near margin to 10pixels and then use FillSceneGraph event handler to fill the gap (b/w Origin to Start of the x-axis).

 My problem is the e.Grid is always null, so I can't do IAdvanceAxis x = e.Grid["X"];

        private void ultraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e)
        {
            IAdvanceAxis xx = (IAdvanceAxis)e.Grid["X"];//e.Grid is null
            IAdvanceAxis yy = (IAdvanceAxis)e.Grid["Y"];//e.Grid is null

            //I can use the following line to make it work.
            //((Infragistics.UltraChart.Core.Primitives.Line)e.SceneGraph[3]).p1.X = 70;
        }
 

Any idea would be much appreciated!

 

Cheers,

Jason 

Parents
  • 160
    Verified Answer
    posted

     Got the reason from help:

    "Access Axis Inside FillSceneGraph Event of a Composite Chart"

     

    This will work:

    IAdvanceAxis xx = (IAdvanceAxis)ultraChart1.CompositeChart.ChartLayers[0].ChartLayer.Grid["X"];

     

    Thanks anyway for viewing!

    Cheers.

     

Reply Children
No Data