Package org.timepedia.chronoscope.client

Examples of org.timepedia.chronoscope.client.DataShape


    private int getPixelPosition(double[] label, int i, double min, double max) {
        return (int) ((label[i] - min) / (max - min) * AXIS_HEIGHT);
    }

    public void testLabelsAllDiffer() {
        DataShape ds[] = Fixtures.getDataShapes();
        // TODO - vary heights as well as valign {top, bottom, center}
        for (DataShape d : ds) {
            double labels[] = RangeAxis.computeLinearTickPositions(d.min, d.max, AXIS_HEIGHT, LABEL_HEIGHT);
            HashSet s=new HashSet();
            for(double l : labels) s.add(l);
View Full Code Here


            assertEquals(labels.length, s.size());
        }
    }

    public void testLabelsDoNotOverlap() {
        DataShape ds[] = Fixtures.getDataShapes();
        // TODO - vary heights as well as valign {top, bottom, center}
        for (DataShape d : ds) {
            double labels[] = RangeAxis.computeLinearTickPositions(d.min, d.max, AXIS_HEIGHT, LABEL_HEIGHT);
            for (int i = 0; i < labels.length - 1; i++) {
                int pixelPos = getPixelPosition(labels, i, d.min, d.max);
View Full Code Here

//    }

    // TODO - catch case of ragged 0, 0.5, 1, 1.5, 2, 2.5;   7 8 9 10 is ok;  and 0, .5, 1.0, 1.5, 2.0 is ok
    //                             1   3   1   3   1   3 ;   1 1 1  2      ;      1   2   3    3    3
    public void testLabelWidthsAreMonotonic() {
        DataShape ds[] = Fixtures.getDataShapes();
        // TODO - vary heights as well as valign {top, bottom, center}
        for (DataShape d : ds) {
            double labels[] = RangeAxis.computeLinearTickPositions(d.min, d.max, AXIS_HEIGHT, LABEL_HEIGHT);
            // TODO - assert monotonicity of RangeAxisRenderer.computeLabelFormat over labels
        }
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.DataShape

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.