Hi all,
I have a problem with the interaction tool. The chart is configured as ChartType composite. I add ChartAreas, Layers and Series dynamically. The following line of code
axisX_ = chartLayer.Grid["X"] as IAdvanceAxis;
returns always null. What's wrong?
Regards
My code:
TimeWindowSelector windowSelector = new TimeWindowSelector(Chart);Chart.AddMouseDownTool(windowSelector);
class TimeWindowSelector : InteractionTool { #region nested class #endregion #region constants readonly attributes #endregion #region attributes private IAdvanceAxis axisX_; #endregion #region properties #endregion #region delegates #endregion #region event #endregion #region public methods public TimeWindowSelector(UltraChart chart) : base(chart) { } public override bool CanStart() { ChartLayer chartLayer = ChartCore.GetChartLayer(); axisX_ = chartLayer.Grid["X"] as IAdvanceAxis; DateTime starting = (DateTime)this.axisX_.MapInverse(LastInput.ViewPoint.X); return true; } #endregion }
The CompositeChart is little different. You can try looking at:
http://forums.infragistics.com/forums/p/13054/48869.aspx#48869