/// <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() { 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); }
/// <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()); } }
/// <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; }
/// <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(); } }