Package com.positive.charts.axis

Examples of com.positive.charts.axis.AxisState


    }
    crosshairState.setCrosshairX(this.getDomainCrosshairValue());
    crosshairState.setCrosshairY(this.getRangeCrosshairValue());
    gc.setClipping(dataArea);

    AxisState domainAxisState = (AxisState) axisStateMap.get(this
        .getDomainAxis());
    if (domainAxisState == null) {
      if (parentState != null) {
        domainAxisState = (AxisState) parentState.getSharedAxisStates()
            .get(this.getDomainAxis());
      }
    }

    AxisState rangeAxisState = (AxisState) axisStateMap.get(this
        .getRangeAxis());
    if (rangeAxisState == null) {
      if (parentState != null) {
        rangeAxisState = (AxisState) parentState.getSharedAxisStates()
            .get(this.getRangeAxis());
      }
    }
    if (domainAxisState != null) {
      this.drawDomainGridlines(gc, dataArea, domainAxisState.getTicks());
    }
    if (rangeAxisState != null) {
      this.drawRangeGridlines(gc, dataArea, rangeAxisState.getTicks());
      this.drawZeroRangeBaseline(gc, dataArea);
    }

    // now draw annotations and render data items...
    boolean foundData = false;
View Full Code Here


    double cursor = RectangleUtil.getMinY(dataArea)
        - this.axisOffset.calculateTopOutset(dataArea.height);
    Iterator iterator = axisCollection.getAxesAtTop().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.TOP, plotState);
      cursor = info.getCursor();
      axisStateMap.put(axis, info);
    }

    // draw the bottom axes
    cursor = RectangleUtil.getMaxY(dataArea)
        + this.axisOffset.calculateBottomOutset(dataArea.height);
    iterator = axisCollection.getAxesAtBottom().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.BOTTOM, plotState);
      cursor = info.getCursor();
      axisStateMap.put(axis, info);
    }

    // draw the left axes
    cursor = RectangleUtil.getMinX(dataArea)
        - this.axisOffset.calculateLeftOutset(dataArea.width);
    iterator = axisCollection.getAxesAtLeft().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.LEFT, plotState);
      cursor = info.getCursor();
      axisStateMap.put(axis, info);
    }

    // draw the right axes
    cursor = RectangleUtil.getMaxX(dataArea)
        + this.axisOffset.calculateRightOutset(dataArea.width);
    iterator = axisCollection.getAxesAtRight().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.RIGHT, plotState);
      cursor = info.getCursor();
      axisStateMap.put(axis, info);
    }

    return axisStateMap;
  }
View Full Code Here

      final Map axisStateMap = this.drawAxes(g2, area, dataArea, state);

      this.drawDomainGridlines(g2, dataArea);

      AxisState rangeAxisState = (AxisState) axisStateMap.get(this
          .getRangeAxis());
      if (rangeAxisState == null) {
        if (parentState != null) {
          rangeAxisState = (AxisState) parentState
              .getSharedAxisStates().get(this.getRangeAxis());
        }
      }
      if (rangeAxisState != null) {
        this
            .drawRangeGridlines(g2, dataArea, rangeAxisState
                .getTicks());
      }

      // draw the markers...
      for (int i = 0; i < this.renderers.size(); i++) {
View Full Code Here

        - this.axisOffset.calculateTopOutset(dataArea.height);
    Iterator iterator = axisCollection.getAxesAtTop().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.TOP, plotState);
        cursor = axisState.getCursor();
        axisStateMap.put(axis, axisState);
      }
    }

    // draw the bottom axes
    cursor = RectangleUtil.getMaxY(dataArea)
        + this.axisOffset.calculateBottomOutset(dataArea.height);
    iterator = axisCollection.getAxesAtBottom().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.BOTTOM, plotState);
        cursor = axisState.getCursor();
        axisStateMap.put(axis, axisState);
      }
    }

    // draw the left axes
    cursor = RectangleUtil.getMinX(dataArea)
        - this.axisOffset.calculateLeftOutset(dataArea.width);
    iterator = axisCollection.getAxesAtLeft().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.LEFT, plotState);
        cursor = axisState.getCursor();
        axisStateMap.put(axis, axisState);
      }
    }

    // draw the right axes
    cursor = RectangleUtil.getMaxX(dataArea)
        + this.axisOffset.calculateRightOutset(dataArea.width);
    iterator = axisCollection.getAxesAtRight().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.RIGHT, plotState);
        cursor = axisState.getCursor();
        axisStateMap.put(axis, axisState);
      }
    }

    return axisStateMap;
View Full Code Here

TOP

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

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.