예제 #1
0
        private IAxisBandInfo GetAxisBandInfo(IAxis axis, Point hitTestPt, out AxisInfo axisInfo)
        {
            IAxisBandInfo bandInfo = null;

            axisInfo = null;

            if (axis is AxisBase axisBase &&
                axisBase.AxisBandsProvider is IAxisBandsProviderBase bandsProvider)
            {
                axisInfo = axis.HitTest(hitTestPt);
                var res = axisInfo.DataValue;

                bandInfo = bandsProvider.AxisBands.FirstOrDefault(bi =>
                                                                  bi.BandRange.Min.CompareTo(res) <= 0 && bi.BandRange.Max.CompareTo(res) >= 0);
            }

            return(bandInfo);
        }