Package org.swtchart

Examples of org.swtchart.Range


    series.setYSeries(ySeries);
   
    IAxisSet axisSet = chart.getAxisSet();
    IAxis xAxis = axisSet.getXAxis(0);
//    xAxis.adjustRange();
    xAxis.setRange(new Range(0.001, 10));
    xAxis.getTitle().setText("Grain Size ( mm )");
    xAxis.enableLogScale(true);
    IAxis yAxis = axisSet.getYAxis(0);
    yAxis.getTitle().setText("Percent Finer");
//    yAxis.setPosition(Position.Secondary);
    yAxis.setRange(new Range(0, 100));
//    axisSet.adjustRange();
   
    chart.update();
  }
View Full Code Here


                    }
                });
            }
            resources.put(colorKey, color);

            axes[i].setRange(new Range(minRanges[i], maxRanges[i]));
            axes[i].setPosition(positions[i]);
            try {
                axes[i].enableLogScale(logScaleStates[i]);
            } catch (IllegalStateException e) {
                axes[i].enableLogScale(false);
View Full Code Here

     * @see Series#getAdjustedRange(Axis, int)
     */
    @Override
    public Range getAdjustedRange(Axis axis, int length) {

        Range range;
        if (axis.getDirection() == Direction.X) {
            range = getXRange();
        } else {
            range = getYRange();
        }
View Full Code Here

            IAxis xAxis = chart.getAxisSet().getXAxis(xAxisId);
            IAxis yAxis = chart.getAxisSet().getYAxis(yAxisId);
            if (xAxis == null || yAxis == null) {
                continue;
            }
            Range xRange = xAxis.getRange();
            Range yRange = yAxis.getRange();

            if (xRange == null || yRange == null) {
                continue;
            }
View Full Code Here

     * Gets the X range of series.
     *
     * @return the X range of series
     */
    public Range getXRange() {
        return new Range(minX, maxX);
    }
View Full Code Here

                if (max < stackSeries[i]) {
                    max = stackSeries[i];
                }
            }
        }
        return new Range(min, max);
    }
View Full Code Here

        double lower = axis.getDataCoordinate(lowerPixelCoordinate,
                range.lower, range.upper);
        double upper = axis.getDataCoordinate(upperPixelCoordinate,
                range.lower, range.upper);

        return new Range(lower, upper);
    }
View Full Code Here

                xseries[i] = indexes[i];
            }
        }

        Rectangle[] rectangles = new Rectangle[xseries.length];
        Range xRange = xAxis.getRange();
        Range yRange = yAxis.getRange();
        for (int i = 0; i < xseries.length; i++) {
            int x = xAxis.getPixelCoordinate(xseries[i]);
            int y = yAxis
                    .getPixelCoordinate(isValidStackSeries() ? stackSeries[indexes[i]]
                            : yseries[i]);
View Full Code Here

     */
    @Override
    public Range getAdjustedRange(Axis axis, int length) {

        // calculate a range which has margin
        Range range;
        int lowerPlotMargin;
        int upperPlotMargin;
        if (axis.getDirection() == Direction.X) {
            double lowerRiserWidth = getRiserWidth(xSeries, 0, axis, minX, maxX);
            double upperRiserWidth = getRiserWidth(xSeries, xSeries.length - 1,
View Full Code Here

    /*
     * @see IAxis#getRange()
     */
    public Range getRange() {
        return new Range(min, max);
    }
View Full Code Here

TOP

Related Classes of org.swtchart.Range

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.