Exemplo n.º 1
0
 public AxisBinder(OSPAxis axis, UxChartControl chartControl, INumericFormatterOptions numericFormatterOptions)
 {
     Axis          = axis;
     _chartControl = chartControl;
     _unitToMinorIntervalMapper = new UnitToMinorIntervalMapper();
     _defaultMinorTickCount     = AxisType == AxisTypes.X ? DEVEXPRESS_DEFAULT_X_MINOR_TICKS : DEVEXPRESS_DEFAULT_Y_MINOR_TICKS;
     _axisView = retrieveAxisView();
     _axisView.VisualRange.Auto = false;
     _numericFormatterOptions   = numericFormatterOptions;
 }
Exemplo n.º 2
0
        private void updateAxisSettingsAndRanges(Axis axis, AxisSettings axisSettings)
        {
            var minValue = axis.GetMinForVisualRange();
            var maxValue = axis.GetMaxForVisualRange();


            axisSettings.Max       = maxValue;
            axisSettings.Min       = minValue;
            axisSettings.AutoRange = axis.VisualRange.Auto;

            // After zoom, there is some strange behaviour around the side margins. When the range is re-applied
            // using SetMinMaxValues, the result is not the same as when first zoom occurred.
            // Easiest way to make the appearance of the chart the same before and after is to apply the zoom range
            // using SetMinMaxValues in the zoom event handler
            axis.VisualRange.SetMinMaxValues(minValue, maxValue);
        }
Exemplo n.º 3
0
        private static void applyAxisZoom(AxisSettings axisSettings, Axis axis)
        {
            if (axisSettings.AutoRange)
            {
                axis.VisualRange.Auto = true;
                return;
            }

            if (!axisSettings.HasRange)
            {
                return;
            }

            axis.VisualRange.Auto = false;
            axis.VisualRange.SetMinMaxValues(axisSettings.Min, axisSettings.Max);
        }
Exemplo n.º 4
0
        private void CustomizeAxis(DevExpress.XtraCharts.Axis p_axis, string p_title)
        {
            p_axis.Color                  = Color.White;
            p_axis.Title.Text             = p_title;
            p_axis.Title.Font             = new System.Drawing.Font("Tahoma", 10.0F);
            p_axis.Title.TextColor        = Color.White;
            p_axis.Title.Visible          = true;
            p_axis.Title.Antialiasing     = true;
            p_axis.Range.MinValue         = 0;
            p_axis.Range.MaxValue         = 100;
            p_axis.Label.TextColor        = Color.White;
            p_axis.Tickmarks.MinorVisible = true;

            //p_axis.Alignment = AxisAlignment.Far;
            p_axis.Title.Alignment = StringAlignment.Far;
        }