/// <summary>
        /// Signals to the Chart that a Series no longer needs to use the axis
        /// within this series host.
        /// </summary>
        /// <param name="series">The Series object that no longer needs to use
        /// the axis.</param>
        /// <param name="axis">The axis that the Series no longer needs to use.
        /// </param>
        void ISeriesHost.UnregisterWithAxis(Series series, IAxis axis)
        {
            if (series == null)
            {
                throw new ArgumentNullException("series");
            }
            if (axis == null)
            {
                throw new ArgumentNullException("axis");
            }
            if (!ActualAxes.Contains(axis))
            {
                throw new InvalidOperationException(Properties.Resources.Chart_UnregisterWithSeries_OneAxisCannotBeUsedByMultipleCharts);
            }

            axis.Unregister(series);
            // If axis is no longer used and is not in external axes collection
            if (!axis.IsUsed && !Axes.Contains(axis))
            {
                InternalActualAxes.Remove(axis);
            }
        }
示例#2
0
        /// <summary>
        /// Signals to the Chart that a Series no longer needs to use the axis 
        /// within this series host.
        /// </summary>
        /// <param name="series">The Series object that no longer needs to use 
        /// the axis.</param>
        /// <param name="axis">The axis that the Series no longer needs to use.
        /// </param>
        void ISeriesHost.UnregisterWithAxis(Series series, IAxis axis)
        {
            if (series == null)
            {
                throw new ArgumentNullException("series");
            }
            if (axis == null)
            {
                throw new ArgumentNullException("axis");
            }
            if (!ActualAxes.Contains(axis))
            {
                throw new InvalidOperationException(Properties.Resources.Chart_UnregisterWithSeries_OneAxisCannotBeUsedByMultipleCharts);
            }

            axis.Unregister(series);
            // If axis is no longer used and is not in external axes collection
            if (!axis.IsUsed && !Axes.Contains(axis))
            {
                InternalActualAxes.Remove(axis);
            }
        }