Examples of java2DToValue()


Examples of com.positive.charts.axis.ValueAxis.java2DToValue()

    if (anchor != null) {
      final ValueAxis domainAxis = this.getDomainAxis();
      if (domainAxis != null) {
        double x;
        if (orient == PlotOrientation.VERTICAL) {
          x = domainAxis.java2DToValue(anchor.x, dataArea, this
              .getDomainAxisEdge());
        } else {
          x = domainAxis.java2DToValue(anchor.y, dataArea, this
              .getDomainAxisEdge());
        }
View Full Code Here

Examples of com.positive.charts.axis.ValueAxis.java2DToValue()

        double x;
        if (orient == PlotOrientation.VERTICAL) {
          x = domainAxis.java2DToValue(anchor.x, dataArea, this
              .getDomainAxisEdge());
        } else {
          x = domainAxis.java2DToValue(anchor.y, dataArea, this
              .getDomainAxisEdge());
        }
        crosshairState.setAnchorX(x);
      }
      final ValueAxis rangeAxis = this.getRangeAxis();
View Full Code Here

Examples of com.positive.charts.axis.ValueAxis.java2DToValue()

      }
      final ValueAxis rangeAxis = this.getRangeAxis();
      if (rangeAxis != null) {
        double y;
        if (orient == PlotOrientation.VERTICAL) {
          y = rangeAxis.java2DToValue(anchor.y, dataArea, this
              .getRangeAxisEdge());
        } else {
          y = rangeAxis.java2DToValue(anchor.x, dataArea, this
              .getRangeAxisEdge());
        }
View Full Code Here

Examples of com.positive.charts.axis.ValueAxis.java2DToValue()

        double y;
        if (orient == PlotOrientation.VERTICAL) {
          y = rangeAxis.java2DToValue(anchor.y, dataArea, this
              .getRangeAxisEdge());
        } else {
          y = rangeAxis.java2DToValue(anchor.x, dataArea, this
              .getRangeAxisEdge());
        }
        crosshairState.setAnchorY(y);
      }
    }
View Full Code Here

Examples of com.positive.charts.axis.ValueAxis.java2DToValue()

    final Rectangle dataArea = info.getDataArea();
    if (dataArea.contains(x, y)) {
      // set the anchor value for the horizontal axis...
      final ValueAxis da = this.getDomainAxis();
      if (da != null) {
        final double hvalue = da.java2DToValue(x, info.getDataArea(),
            this.getDomainAxisEdge());
        this.setDomainCrosshairValue(hvalue);
      }

      // set the anchor value for the vertical axis...
View Full Code Here

Examples of com.positive.charts.axis.ValueAxis.java2DToValue()

      }

      // set the anchor value for the vertical axis...
      final ValueAxis ra = this.getRangeAxis();
      if (ra != null) {
        final double vvalue = ra.java2DToValue(y, info.getDataArea(),
            this.getRangeAxisEdge());
        this.setRangeCrosshairValue(vvalue);
      }
    }
  }
View Full Code Here

Examples of org.jfree.chart.axis.DateAxis.java2DToValue()

     */
    public void testJava2DToValue() {
        DateAxis axis = new DateAxis();
        axis.setRange(50.0, 100.0);
        Rectangle2D dataArea = new Rectangle2D.Double(10.0, 50.0, 400.0, 300.0);
        double y1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.LEFT);
        assertTrue(same(y1, 95.8333333, 1.0));
        double y2 = axis.java2DToValue(75.0, dataArea, RectangleEdge.RIGHT);
        assertTrue(same(y2, 95.8333333, 1.0));
        double x1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.TOP);
        assertTrue(same(x1, 58.125, 1.0));
View Full Code Here

Examples of org.jfree.chart.axis.LogAxis.java2DToValue()

     */
    public void testTranslateJava2DToValue() {
        LogAxis axis = new LogAxis();
        axis.setRange(50.0, 100.0);
        Rectangle2D dataArea = new Rectangle2D.Double(10.0, 50.0, 400.0, 300.0);
        double y1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.LEFT);
        assertEquals(94.3874312681693, y1, EPSILON);
        double y2 = axis.java2DToValue(75.0, dataArea, RectangleEdge.RIGHT);
        assertEquals(94.3874312681693, y2, EPSILON);
        double x1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.TOP);
        assertEquals(55.961246381405, x1, EPSILON);
View Full Code Here

Examples of org.jfree.chart.axis.NumberAxis.java2DToValue()

     */
    public void testTranslateJava2DToValue() {
        NumberAxis axis = new NumberAxis();
        axis.setRange(50.0, 100.0);
        Rectangle2D dataArea = new Rectangle2D.Double(10.0, 50.0, 400.0, 300.0);
        double y1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.LEFT);
        assertEquals(y1, 95.8333333, EPSILON);
        double y2 = axis.java2DToValue(75.0, dataArea, RectangleEdge.RIGHT);
        assertEquals(y2, 95.8333333, EPSILON);
        double x1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.TOP);
        assertEquals(x1, 58.125, EPSILON);
View Full Code Here

Examples of org.jfree.chart.axis.NumberAxis.java2DToValue()

        NumberAxis axis = new NumberAxis();
        axis.setRange(50.0, 100.0);
        Rectangle2D dataArea = new Rectangle2D.Double(10.0, 50.0, 400.0, 300.0);
        double y1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.LEFT);
        assertEquals(y1, 95.8333333, EPSILON);
        double y2 = axis.java2DToValue(75.0, dataArea, RectangleEdge.RIGHT);
        assertEquals(y2, 95.8333333, EPSILON);
        double x1 = axis.java2DToValue(75.0, dataArea, RectangleEdge.TOP);
        assertEquals(x1, 58.125, EPSILON);
        double x2 = axis.java2DToValue(75.0, dataArea, RectangleEdge.BOTTOM);
        assertEquals(x2, 58.125, EPSILON);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.