/// <summary>
        /// Acquire a horizontal category axis and a vertical linear axis.
        /// </summary>
        /// <param name="firstDataPoint">The first data point.</param>
        protected override void GetAxes(DataPoint firstDataPoint)
        {
            GetCategoryAxis(
                InternalIndependentAxis,
                firstDataPoint,
                AxisOrientation.Horizontal,
                () => new CategoryAxis(),
                () => ActualIndependentCategoryAxis,
                (value) => { InternalActualIndependentAxis = (IAxis)value; },
                (dataPoint) => dataPoint.IndependentValue);

            GetRangeAxis(
                InternalDependentAxis,
                firstDataPoint,
                AxisOrientation.Vertical,
                () =>
            {
                HybridAxis axis    = (HybridAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);
                axis.ShowGridLines = true;
                return((IRangeAxis)axis);
            },
                () => ActualDependentRangeAxis,
                (value) => { InternalActualDependentAxis = (IAxis)value; },
                (dataPoint) => dataPoint.DependentValue);
        }
Beispiel #2
0
        /// <summary>
        /// ShowGridLinesProperty property changed handler.
        /// </summary>
        /// <param name="d">Axis that changed its ShowGridLines.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnShowGridLinesPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HybridAxis source   = (HybridAxis)d;
            bool       oldValue = (bool)e.OldValue;
            bool       newValue = (bool)e.NewValue;

            source.OnShowGridLinesPropertyChanged(oldValue, newValue);
        }
Beispiel #3
0
        /// <summary>
        /// TitleProperty property changed handler.
        /// </summary>
        /// <param name="d">HybridAxis that changed its Title.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnTitlePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HybridAxis source   = (HybridAxis)d;
            object     oldValue = (object)e.OldValue;
            object     newValue = (object)e.NewValue;

            source.OnTitlePropertyChanged(oldValue, newValue);
        }
Beispiel #4
0
        /// <summary>
        /// AxisProperty property changed handler.
        /// </summary>
        /// <param name="oldValue">Old value.</param>
        /// <param name="newValue">New value.</param>
        private void OnAxisPropertyChanged(HybridAxis oldValue, HybridAxis newValue)
        {
            Debug.Assert(newValue != null, "Don't set the axis property to null.");

            if (newValue != null)
            {
                newValue.Invalidated += OnAxisInvalidated;
            }

            if (oldValue != null)
            {
                oldValue.Invalidated -= OnAxisInvalidated;
            }
        }
Beispiel #5
0
 /// <summary>
 /// Instantiates a new instance of the GridLines class.
 /// </summary>
 /// <param name="axis">The axis used by the GridLines.</param>
 public GridLines(HybridAxis axis)
 {
     this.Axis = axis;
     this.SizeChanged += new SizeChangedEventHandler(OnSizeChanged);
 }
Beispiel #6
0
        /// <summary>
        /// AxisProperty property changed handler.
        /// </summary>
        /// <param name="oldValue">Old value.</param>
        /// <param name="newValue">New value.</param>
        private void OnAxisPropertyChanged(HybridAxis oldValue, HybridAxis newValue)
        {
            Debug.Assert(newValue != null, "Don't set the axis property to null.");

            if (newValue != null)
            {
                newValue.Invalidated += OnAxisInvalidated;
            }

            if (oldValue != null)
            {
                oldValue.Invalidated -= OnAxisInvalidated;
            }
        }
Beispiel #7
0
 /// <summary>
 /// Instantiates a new instance of the GridLines class.
 /// </summary>
 /// <param name="axis">The axis used by the GridLines.</param>
 public GridLines(HybridAxis axis)
 {
     this.Axis         = axis;
     this.SizeChanged += new SizeChangedEventHandler(OnSizeChanged);
 }