コード例 #1
0
 void AxisLayoutAlgorithmPropertyChanged()
 {             
     switch (AxisLayoutAlgorithm)
     {
         case AxisLayoutAlgorithm.Wilkinson:
             _axisLabeler = new WilkinsonAxisLabeler();
             break;
         case AxisLayoutAlgorithm.ExtendedWilkinson:
             _axisLabeler = new ExtendedAxisLabeler();
             break;
         case AxisLayoutAlgorithm.MatPlotLib:
             _axisLabeler = new MatplotlibAxisLabeler();
             break;
         case AxisLayoutAlgorithm.Heckbert:
             _axisLabeler = new HeckbertAxisLabeler();
             break;
     }
 }
コード例 #2
0
        public Axis layoutAxis()
        {
            AxisLabeler labeler = new NoOpAxisLabeler();

            if (_options.Symbol is Numeric)
                switch (algorithm)
                {
                    case Algorithm.ExtendedWilkinson:
                        labeler = new ExtendedAxisLabeler();
                        break;
                    case Algorithm.Heckbert:
                        labeler = new HeckbertAxisLabeler();
                        break;
                    case Algorithm.MatPlotLib:
                        labeler = new MatplotlibAxisLabeler();
                        break;
                    case Algorithm.Wilkinson:
                        labeler = new WilkinsonAxisLabeler();
                        break;
                }
            else if (_options.Symbol is Factor) labeler = new CategoricalAxisLabeler();

            return labeler.Generate(_options, AxisDensity);
        }