Package org.swtchart

Examples of org.swtchart.ISeries


      ySeries[i] = sieve.getPercentFiner();
    }
   
    ISeriesSet seriesSet = chart.getSeriesSet();
   
    ISeries series = seriesSet.createSeries(SeriesType.LINE, "Particle Size Curve");
    series.setXSeries(xSeries);
    series.setYSeries(ySeries);
   
    IAxisSet axisSet = chart.getAxisSet();
    IAxis xAxis = axisSet.getXAxis(0);
//    xAxis.adjustRange();
    xAxis.setRange(new Range(0.001, 10));
View Full Code Here


        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);

        ISeries timeSeries = chart.getSeriesSet().getSeries()[0];
        int line = Arrays.binarySearch(timeSeries.getXDateSeries(), cal.getTime());

        if (line >= 0)
            return cal.getTime();

        // otherwise: find closest existing date
        line = -line - 1;

        if (line == 0)
            return timeSeries.getXDateSeries()[line];

        int length = timeSeries.getXDateSeries().length;
        if (line >= length)
            return timeSeries.getXDateSeries()[length - 1];

        // check which date is closer to the targeted date
        long target = cal.getTimeInMillis();
        Date left = timeSeries.getXDateSeries()[line - 1];
        Date right = timeSeries.getXDateSeries()[line];

        return target - left.getTime() < right.getTime() - target ? left : right;
    }
View Full Code Here

    // tab item: chart
    // //////////////////////////////////////////////////////////////

    private void updateChart(Security security)
    {
        ISeries series = chart.getSeriesSet().getSeries(Messages.ColumnQuote);
        if (series != null)
            chart.getSeriesSet().deleteSeries(Messages.ColumnQuote);
        chart.clearMarkerLines();

        if (security == null || security.getPrices().isEmpty())
View Full Code Here

TOP

Related Classes of org.swtchart.ISeries

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.