Package org.swtchart

Examples of org.swtchart.ILineSeries


      String id = Integer.toString(i+1) + ". ";
      if (cd.getLabel() != null)
        id += " " + cd.getLabel();
     
      ILineSeries lineSeries = (ILineSeries) this.chart.getSeriesSet().createSeries(SeriesType.LINE,id);
      lineSeries.setXDateSeries(labelLine.toArray(new Date[labelLine.size()]));
      lineSeries.setYSeries(toArray(dataLine));
     
     
      //////////////////////////////////////////////////////////////////////////
      // Layout
      lineSeries.setSymbolType(PlotSymbolType.NONE);
      lineSeries.enableArea(true); // Flaeche ausmalen
      lineSeries.setAntialias(SWT.ON);
      lineSeries.enableStack(this.isStacked());
      lineSeries.enableStep(!cd.getCurve());
      lineSeries.setLineWidth(1);
      //
      //////////////////////////////////////////////////////////////////////////

      //////////////////////////////////////////////////////////////////////////
      // Farben
      int[] cValues = cd.getColor();
      if (cValues == null)
        cValues = ColorGenerator.create(ColorGenerator.PALETTE_OFFICE + i);
      lineSeries.setLineColor(getColor(new RGB(cValues[0],cValues[1],cValues[2])));
      lineSeries.enableArea(cd.isFilled());
      //
      //////////////////////////////////////////////////////////////////////////
    }
   
    this.chart.getAxisSet().adjustRange();
View Full Code Here


        toolTip.setValueFormat(new DecimalFormat("#0.0%")); //$NON-NLS-1$
    }

    public ILineSeries addSeries(String label, double[] values, Color color)
    {
        ILineSeries series = (ILineSeries) getSeriesSet().createSeries(SeriesType.LINE, label);
        series.setYSeries(values);

        series.setLineWidth(2);
        series.setSymbolType(PlotSymbolType.NONE);
        series.setAntialias(SWT.ON);

        series.enableStack(true);
        series.enableArea(true);
        series.setLineColor(color);

        return series;
    }
View Full Code Here

        addDateSeries(dates, values, resources.createColor(color.swt()), showArea, color.name());
    }

    private ILineSeries addDateSeries(Date[] dates, double[] values, Color color, boolean showArea, String label)
    {
        ILineSeries lineSeries = (ILineSeries) getSeriesSet().createSeries(SeriesType.LINE, label);
        lineSeries.setXDateSeries(dates);
        lineSeries.enableArea(showArea);
        lineSeries.setLineWidth(2);
        lineSeries.setSymbolType(PlotSymbolType.NONE);
        lineSeries.setYSeries(values);
        lineSeries.setLineColor(color);
        lineSeries.setAntialias(SWT.ON);
        return lineSeries;
    }
View Full Code Here

            SecurityPrice p = prices.get(index);
            dates[ii] = p.getTime();
            values[ii] = p.getValue() / Values.Quote.divider();
        }

        ILineSeries lineSeries = (ILineSeries) chart.getSeriesSet().createSeries(SeriesType.LINE, Messages.ColumnQuote);
        lineSeries.setXDateSeries(dates);
        lineSeries.setLineWidth(2);
        lineSeries.enableArea(true);
        lineSeries.setSymbolType(PlotSymbolType.NONE);
        lineSeries.setYSeries(values);
        lineSeries.setAntialias(SWT.ON);

        chart.getAxisSet().adjustRange();

        for (Portfolio portfolio : getClient().getPortfolios())
        {
View Full Code Here

        }

        switch ((ClientDataSeries) item.getInstance())
        {
            case TOTALS:
                ILineSeries tSeries = chart.addDateSeries(clientIndex.getDates(), //
                                toDouble(clientIndex.getTotals(), Values.Amount.divider()), //
                                Messages.LabelTotalSum);
                item.configure(tSeries);
                break;
            case TRANSFERALS:
                IBarSeries tfSeries = chart.addDateBarSeries(clientIndex.getDates(), //
                                toDouble(clientIndex.getTransferals(), Values.Amount.divider()), //
                                Messages.LabelTransferals);
                item.configure(tfSeries);
                break;
            case INVESTED_CAPITAL:
                ILineSeries ivSeries = chart.addDateSeries(clientIndex.getDates(), //
                                toDouble(clientIndex.calculateInvestedCapital(), Values.Amount.divider()), //
                                item.getLabel());
                item.configure(ivSeries);
                break;
            case ABSOLUTE_DELTA:
                ILineSeries dSeries = chart.addDateSeries(clientIndex.getDates(), //
                                toDouble(clientIndex.calculateAbsoluteDelta(), Values.Amount.divider()), //
                                item.getLabel());
                item.configure(dSeries);
                break;
            case TAXES:
                ILineSeries txSeries = chart.addDateSeries(clientIndex.getDates(), //
                                accumulateAndToDouble(clientIndex.getTaxes(), Values.Amount.divider()), //
                                item.getLabel());
                item.configure(txSeries);
                break;
        }
View Full Code Here

        {
            securityIndex = PerformanceIndex.forInvestment(getClient(), security, getReportingPeriod(), warnings);
            dataCache.put(security, securityIndex);
        }

        ILineSeries series = chart.addDateSeries(securityIndex.getDates(), //
                        toDouble(securityIndex.getTotals(), Values.Amount.divider()), //
                        security.getName());
        item.configure(series);
    }
View Full Code Here

        {
            portfolioIndex = PerformanceIndex.forPortfolio(getClient(), portfolio, getReportingPeriod(), warnings);
            dataCache.put(portfolio, portfolioIndex);
        }

        ILineSeries series = chart.addDateSeries(portfolioIndex.getDates(), //
                        toDouble(portfolioIndex.getTotals(), Values.Amount.divider()), //
                        portfolio.getName());
        item.configure(series);
    }
View Full Code Here

        {
            accountIndex = PerformanceIndex.forAccount(getClient(), account, getReportingPeriod(), warnings);
            dataCache.put(account, accountIndex);
        }

        ILineSeries series = chart.addDateSeries(accountIndex.getDates(), //
                        toDouble(accountIndex.getTotals(), Values.Amount.divider()), //
                        account.getName());
        item.configure(series);
    }
View Full Code Here

        {
            index = PerformanceIndex.forClassification(getClient(), classification, getReportingPeriod(), warnings);
            dataCache.put(classification, index);
        }

        ILineSeries series = chart.addDateSeries(index.getDates(), //
                        toDouble(index.getTotals(), Values.Amount.divider()), //
                        classification.getName());
        item.configure(series);
    }
View Full Code Here

                        aggregationPeriod) : clientIndex;

        switch (type)
        {
            case TOTALS:
                ILineSeries series = chart.addDateSeries(aggregatedIndex.getDates(), //
                                aggregatedIndex.getAccumulatedPercentage(), //
                                Messages.PerformanceChartLabelAccumulatedIRR);
                item.configure(series);
                break;
            case TRANSFERALS:
View Full Code Here

TOP

Related Classes of org.swtchart.ILineSeries

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.