SuggestYAxis() public method

Returns a y-axis that is suitable for drawing the data.
public SuggestYAxis ( ) : Axis
return Axis
Ejemplo n.º 1
0
        /// <summary>
        /// Returns a y-axis that is suitable for drawing this plot.
        /// </summary>
        /// <returns>A suitable y-axis.</returns>
        public Axis SuggestYAxis()
        {
            SequenceAdapter data_ =
                new SequenceAdapter(this.DataSource, this.DataMember, this.OrdinateData, this.AbscissaData);

            return(data_.SuggestYAxis());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns an Y-axis suitable for use by this plot. The axis will be one that is just long
        /// enough to show all data.
        /// </summary>
        /// <returns>Y-axis suitable for use by this plot.</returns>
        public Axis SuggestYAxis()
        {
            SequenceAdapter data =
                new SequenceAdapter(DataSource, DataMember, OrdinateData, AbscissaData);

            return(data.SuggestYAxis());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns a y-axis that is suitable for drawing this plot.
        /// </summary>
        /// <returns>A suitable y-axis.</returns>
        public Axis SuggestYAxis()
        {
            SequenceAdapter dataBottom_ =
                new SequenceAdapter(DataSource, DataMember, OrdinateDataBottom, AbscissaData);

            SequenceAdapter dataTop_ =
                new SequenceAdapter(DataSource, DataMember, OrdinateDataTop, AbscissaData);

            Axis axis = dataTop_.SuggestYAxis();

            axis.LUB(dataBottom_.SuggestYAxis());
            return(axis);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Returns a y-axis that is suitable for drawing this plot.
        /// </summary>
        /// <returns>A suitable y-axis.</returns>
        public Axis SuggestYAxis()
        {
            if (this.isStacked_)
            {
                double    tmpMax      = 0.0f;
                ArrayList adapterList = new ArrayList();

                HistogramPlot currentPlot = this;
                do
                {
                    adapterList.Add(new SequenceAdapter(
                                        currentPlot.DataSource,
                                        currentPlot.DataMember,
                                        currentPlot.OrdinateData,
                                        currentPlot.AbscissaData)
                                    );
                } while ((currentPlot = currentPlot.stackedTo_) != null);

                SequenceAdapter[] adapters =
                    (SequenceAdapter[])adapterList.ToArray(typeof(SequenceAdapter));

                for (int i = 0; i < adapters[0].Count; ++i)
                {
                    double tmpHeight = 0.0f;
                    for (int j = 0; j < adapters.Length; ++j)
                    {
                        tmpHeight += adapters[j][i].Y;
                    }
                    tmpMax = Math.Max(tmpMax, tmpHeight);
                }

                Axis a = new LinearAxis(0.0f, tmpMax);
                // TODO make 0.08 a parameter.
                a.IncreaseRange(0.08);
                return(a);
            }
            else
            {
                SequenceAdapter data =
                    new SequenceAdapter(this.DataSource, this.DataMember, this.OrdinateData, this.AbscissaData);

                return(data.SuggestYAxis());
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns a y-axis that is suitable for drawing this plot.
        /// </summary>
        /// <returns>A suitable y-axis.</returns>
        public Axis SuggestYAxis()
        {
            SequenceAdapter dataBottom_ =
                new SequenceAdapter( this.DataSource, this.DataMember, this.OrdinateDataBottom, this.AbscissaData );

            SequenceAdapter dataTop_ =
                new SequenceAdapter( this.DataSource, this.DataMember, this.OrdinateDataTop, this.AbscissaData );

            Axis axis = dataTop_.SuggestYAxis();
            axis.LUB(dataBottom_.SuggestYAxis());
            return axis;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Returns a y-axis that is suitable for drawing this plot.
        /// </summary>
        /// <returns>A suitable y-axis.</returns>
        public Axis SuggestYAxis()
        {
            SequenceAdapter data_ =
                new SequenceAdapter( this.DataSource, this.DataMember, this.OrdinateData, this.AbscissaData );

            return data_.SuggestYAxis();
        }
        /// <summary>
        /// Returns a y-axis that is suitable for drawing this plot.
        /// </summary>
        /// <returns>A suitable y-axis.</returns>
        public Axis SuggestYAxis()
        {
            if ( this.isStacked_ )
            {
                double tmpMax = 0.0f;
                ArrayList adapterList = new ArrayList();

                HistogramPlot currentPlot = this;
                do
                {
                    adapterList.Add( new SequenceAdapter(
                        currentPlot.DataSource,
                        currentPlot.DataMember,
                        currentPlot.OrdinateData,
                        currentPlot.AbscissaData )
                    );
                } while ((currentPlot = currentPlot.stackedTo_) != null);

                SequenceAdapter[] adapters =
                    (SequenceAdapter[])adapterList.ToArray(typeof(SequenceAdapter));

                for (int i=0; i<adapters[0].Count; ++i)
                {
                    double tmpHeight = 0.0f;
                    for (int j=0; j<adapters.Length; ++j)
                    {
                        tmpHeight += adapters[j][i].Y;
                    }
                    tmpMax = Math.Max(tmpMax, tmpHeight);
                }

                Axis a = new LinearAxis(0.0f,tmpMax);
                // TODO make 0.08 a parameter.
                a.IncreaseRange( 0.08 );
                return a;
            }
            else
            {
                SequenceAdapter data =
                    new SequenceAdapter( this.DataSource, this.DataMember, this.OrdinateData, this.AbscissaData );

                return data.SuggestYAxis();
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Returns an Y-axis suitable for use by this plot. The axis will be one that is just long
 /// enough to show all data.
 /// </summary>
 /// <returns>Y-axis suitable for use by this plot.</returns>
 public Axis SuggestYAxis()
 {
     SequenceAdapter data = new SequenceAdapter (DataSource, DataMember, OrdinateData, AbscissaData);
     return data.SuggestYAxis();
 }