Package com.positive.charts.axis

Examples of com.positive.charts.axis.ValueAxis


    if (r == null) {
      return;
    }

    final Collection markers = this.getRangeMarkers(index, layer);
    final ValueAxis axis = this.getRangeAxisForDataset(index);
    if ((markers != null) && (axis != null)) {
      final Iterator iterator = markers.iterator();
      while (iterator.hasNext()) {
        final Marker marker = (Marker) iterator.next();
        r.drawRangeMarker(g2, this, axis, marker, dataArea);
View Full Code Here


   *            the axis index.
   *
   * @return The axis (<code>null</code> possible).
   */
  public ValueAxis getRangeAxis(final int index) {
    ValueAxis result = null;
    if (index < this.rangeAxes.size()) {
      result = (ValueAxis) this.rangeAxes.get(index);
    }
    if (result == null) {
      final Plot parent = this.getParent();
View Full Code Here

   *            the dataset index.
   *
   * @return The range axis.
   */
  public ValueAxis getRangeAxisForDataset(final int index) {
    ValueAxis result = this.getRangeAxis();
    final Integer axisIndex = (Integer) this.datasetToRangeAxisMap
        .get(index);
    if (axisIndex != null) {
      result = this.getRangeAxis(axisIndex.intValue());
    }
View Full Code Here

    boolean foundData = false;
    final CategoryDataset currentDataset = this.getDataset(index);
    final CategoryItemRenderer renderer = this.getRenderer(index);
    final CategoryAxis domainAxis = this.getDomainAxisForDataset(index);
    final ValueAxis rangeAxis = this.getRangeAxisForDataset(index);
    final boolean hasData = !DatasetUtilities.isEmptyOrNull(currentDataset);
    if (hasData && (renderer != null)) {

      foundData = true;
      final CategoryItemRendererState state = renderer.initialise(g2,
View Full Code Here

   * @param notify
   *            notify listeners?
   */
  public void setRangeAxis(final int index, final ValueAxis axis,
      final boolean notify) {
    final ValueAxis existing = (ValueAxis) this.rangeAxes.get(index);
    if (existing != null) {
      existing.removeChangeListener(this);
    }
    if (axis != null) {
      axis.setPlot(this);
    }
    this.rangeAxes.set(index, axis);
View Full Code Here

   */
  public void zoomRangeAxes(final double lowerPercent,
      final double upperPercent, final PlotRenderingInfo state,
      final Point source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
      final ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
      if (rangeAxis != null) {
        rangeAxis.zoomRange(lowerPercent, upperPercent);
      }
    }
  }
View Full Code Here

   *            the source point (in Java2D space) for the zoom.
   */
  public void zoomRangeAxes(final double factor,
      final PlotRenderingInfo state, final Point source) {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
      final ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
      if (rangeAxis != null) {
        rangeAxis.resizeRange(factor);
      }
    }
  }
View Full Code Here

   *            the axis index (<code>null</code> for the primary axis).
   *
   * @return A range axis.
   */
  protected ValueAxis getRangeAxis(final CategoryPlot plot, final int index) {
    ValueAxis result = plot.getRangeAxis(index);
    if (result == null) {
      result = plot.getRangeAxis();
    }
    return result;
  }
View Full Code Here

    XYItemRenderer renderer = this.getRenderer(index);
    if (renderer == null) {
      renderer = this.getRenderer();
    }

    final ValueAxis domainAxis = this.getDomainAxisForDataset(index);
    final ValueAxis rangeAxis = this.getRangeAxisForDataset(index);
    final double lowerBound = domainAxis.getLowerBound();
    final double upperBound = domainAxis.getUpperBound();

    List series;
    if (dataset instanceof TableXYDataset) {
View Full Code Here

    final CategoryItemRendererState state = super.initialise(g2, dataArea,
        plot, rendererIndex, info);

    // get the clipping values...
    final ValueAxis rangeAxis = this.getRangeAxis(plot, rendererIndex);
    this.lowerClip = rangeAxis.getRange().getLowerBound();
    this.upperClip = rangeAxis.getRange().getUpperBound();

    // calculate the bar width
    this.calculateBarWidth(plot, dataArea, rendererIndex, state);

    return state;
View Full Code Here

TOP

Related Classes of com.positive.charts.axis.ValueAxis

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.