Ejemplo n.º 1
0
        private void UpdateCrossings()
        {
            if (m_Updating)
            {
                return;
            }

            NAxis xAxis = m_Chart.Axis(StandardAxis.PrimaryX);
            NAxis yAxis = m_Chart.Axis(StandardAxis.PrimaryY);

            NCrossAxisAnchor crossAnchor;

            // update the x axis anchor
            crossAnchor  = new NCrossAxisAnchor();
            xAxis.Anchor = crossAnchor;
            crossAnchor.AxisOrientation = AxisOrientation.Horizontal;
            crossAnchor.Crossings.Add(new NModelAxisCrossing(yAxis, (HorzAlign)this.BottomAxisAlignmentComboBox.SelectedIndex, BottomAxisOffsetUC.Length));

            // update the y axis anchor
            crossAnchor = new NCrossAxisAnchor();
            crossAnchor.AxisOrientation = AxisOrientation.Vertical;
            yAxis.Anchor = crossAnchor;
            crossAnchor.Crossings.Add(new NModelAxisCrossing(xAxis, (HorzAlign)this.LeftAxisAlignmentComboBox.SelectedIndex, LeftAxisOffsetUC.Length));

            nChartControl1.Refresh();
        }
Ejemplo n.º 2
0
        private void BottomAxisScroll_Scroll(object sender, Nevron.UI.WinForm.Controls.ScrollBarEventArgs e)
        {
            BottomAxisLabel.Text = BottomAxisScroll.Value.ToString();

            double posValue = (double)BottomAxisScroll.Value;

            NCrossAxisAnchor crossAnchor = m_Chart.Axis(StandardAxis.PrimaryX).Anchor as NCrossAxisAnchor;

            if (crossAnchor != null)
            {
                ((NValueAxisCrossing)crossAnchor.Crossings[0]).Value = posValue;
                nChartControl1.Refresh();
            }
        }
        private void UpdateCrossings()
        {
            NAxis xAxis = m_Chart.Axis(StandardAxis.PrimaryX);
            NAxis yAxis = m_Chart.Axis(StandardAxis.PrimaryY);

            NCrossAxisAnchor crossAnchor;

            // update the x axis anchor
            crossAnchor  = new NCrossAxisAnchor();
            xAxis.Anchor = crossAnchor;
            crossAnchor.AxisOrientation = AxisOrientation.Horizontal;
            crossAnchor.Crossings.Add(new NModelAxisCrossing(yAxis, (HorzAlign)BottomAxisDropDownList.SelectedIndex, new NLength(LengthBottomAxisDropDownList.SelectedIndex * 10, NRelativeUnit.ParentPercentage)));

            // update the y axis anchor
            crossAnchor = new NCrossAxisAnchor();
            crossAnchor.AxisOrientation = AxisOrientation.Vertical;
            yAxis.Anchor = crossAnchor;
            crossAnchor.Crossings.Add(new NModelAxisCrossing(xAxis, (HorzAlign)LeftAxisAligmentDropDownList.SelectedIndex, new NLength(LengthLeftAxisDropDownList.SelectedIndex * 10, NRelativeUnit.ParentPercentage)));
        }