Package com.positive.charts.axis.ticks

Examples of com.positive.charts.axis.ticks.TickUnit


    double tickLabelWidth = this.estimateMaximumTickLabelWidth(g2, this
        .getTickUnit());

    // start with the current tick unit...
    final TickUnitSource tickUnits = this.getStandardTickUnits();
    final TickUnit unit1 = tickUnits.getCeilingTickUnit(this.getTickUnit());
    final double unit1Width = this.lengthToJava2D(unit1.getSize(),
        dataArea, edge);

    // then extrapolate...
    final double guess = (tickLabelWidth / unit1Width) * unit1.getSize();

    NumberTickUnit unit2 = (NumberTickUnit) tickUnits
        .getCeilingTickUnit(guess);
    final double unit2Width = this.lengthToJava2D(unit2.getSize(),
        dataArea, edge);
View Full Code Here


      final Rectangle dataArea, final RectangleEdge edge) {
    double tickLabelHeight = this.estimateMaximumTickLabelHeight(g2);

    // start with the current tick unit...
    final TickUnitSource tickUnits = this.getStandardTickUnits();
    final TickUnit unit1 = tickUnits.getCeilingTickUnit(this.getTickUnit());
    final double unitHeight = this.lengthToJava2D(unit1.getSize(),
        dataArea, edge);

    // then extrapolate...
    final double guess = (tickLabelHeight / unitHeight) * unit1.getSize();

    NumberTickUnit unit2 = (NumberTickUnit) tickUnits
        .getCeilingTickUnit(guess);
    final double unit2Height = this.lengthToJava2D(unit2.getSize(),
        dataArea, edge);
View Full Code Here

    double tickLabelWidth = this.estimateMaximumTickLabelWidth(g2, this
        .getTickUnit());

    // start with the current tick unit...
    final TickUnitSource tickUnits = this.getStandardTickUnits();
    final TickUnit unit1 = tickUnits.getCeilingTickUnit(this.getTickUnit());
    final double x1 = this.valueToJava2D(shift + unit1.getSize(), dataArea,
        edge);
    final double unit1Width = Math.abs(x1 - zero);

    // then extrapolate...
    final double guess = (tickLabelWidth / unit1Width) * unit1.getSize();
    DateTickUnit unit2 = (DateTickUnit) tickUnits.getCeilingTickUnit(guess);
    final double x2 = this.valueToJava2D(shift + unit2.getSize(), dataArea,
        edge);
    final double unit2Width = Math.abs(x2 - zero);
    tickLabelWidth = this.estimateMaximumTickLabelWidth(g2, unit2);
View Full Code Here

TOP

Related Classes of com.positive.charts.axis.ticks.TickUnit

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.