Example usage for org.jfree.data XYSeries XYSeries

List of usage examples for org.jfree.data XYSeries XYSeries

Introduction

In this page you can find the example usage for org.jfree.data XYSeries XYSeries.

Prototype

public XYSeries(final String name) 

Source Link

Document

Creates a new empty series.

Usage

From source file:simMPLS.scenario.TReceiverStats.java

/**
 * Este mtodo crea una nueva instancia de TEstadisticasReceptor.
 * @since 1.0/*ww w .  j a v a 2s .c  o  m*/
 */
public TReceiverStats() {
    paquetesEntrantes = new XYSeriesCollection();
    entrantesIPv4 = new XYSeries(TStats.IPV4);
    entrantesIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    entrantesIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    entrantesIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    entrantesMPLS = new XYSeries(TStats.MPLS);
    entrantesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    entrantesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    entrantesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    entrantesGPSRP = new XYSeries(TStats.GPSRP);
    tEIPV4 = 0;
    tEIPV4_GOS1 = 0;
    tEIPV4_GOS2 = 0;
    tEIPV4_GOS3 = 0;
    tEMPLS = 0;
    tEMPLS_GOS1 = 0;
    tEMPLS_GOS2 = 0;
    tEMPLS_GOS3 = 0;
    tEGPSRP = 0;
}

From source file:simMPLS.scenario.TSenderStats.java

/**
 * Creates a new instance of TEstadisticasEmisor
 * @since 1.0// w ww  .j av  a  2 s  .c o m
 */
public TSenderStats() {
    paquetesSalientes = new XYSeriesCollection();
    paquetesDescartados = new XYSeriesCollection();
    salientesIPv4 = new XYSeries(TStats.IPV4);
    salientesIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    salientesIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    salientesIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    salientesMPLS = new XYSeries(TStats.MPLS);
    salientesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    salientesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    salientesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    descartadosIPv4 = new XYSeries(TStats.IPV4);
    descartadosIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    descartadosIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    descartadosIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    descartadosMPLS = new XYSeries(TStats.MPLS);
    descartadosMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    descartadosMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    descartadosMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    tSIPV4 = 0;
    tSIPV4_GOS1 = 0;
    tSIPV4_GOS2 = 0;
    tSIPV4_GOS3 = 0;
    tSMPLS = 0;
    tSMPLS_GOS1 = 0;
    tSMPLS_GOS2 = 0;
    tSMPLS_GOS3 = 0;
    tDIPV4 = 0;
    tDIPV4_GOS1 = 0;
    tDIPV4_GOS2 = 0;
    tDIPV4_GOS3 = 0;
    tDMPLS = 0;
    tDMPLS_GOS1 = 0;
    tDMPLS_GOS2 = 0;
    tDMPLS_GOS3 = 0;
}

From source file:edu.caltechUcla.sselCassel.projects.jMarkets.shared.interfaces.PriceChart.java

public void test() {
    XYSeries testSeries = new XYSeries("Test Series");
    testSeries.add(10, 10);/* w w w.j  av a 2s.  co  m*/
    testSeries.add(20, 20);
    testSeries.add(30, 30);

    XYSeriesCollection collection = new XYSeriesCollection(testSeries);

    NumberAxis yAxis = new NumberAxis("Y Axis");
    NumberAxis xAxis = new NumberAxis("X Axis");

    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();

    XYPlot plot = new XYPlot(collection, xAxis, yAxis, renderer);

    JFreeChart chart = new JFreeChart("Price Chart", new Font("Arial", 0, 12), plot, true);
    ChartPanel chartPanel = new ChartPanel(chart, false, false, false, false, false);

    JFrame frame = new JFrame();
    frame.getContentPane().add(chartPanel);
    frame.setVisible(true);
    frame.pack();

}

From source file:simMPLS.scenario.TLSRStats.java

/**
 * Crea una nueva instancia de TEstadisticasLSR
 * @since 1.0//from   ww w. j av a  2  s  . c  o m
 */
public TLSRStats() {
    paquetesEntrantes = new XYSeriesCollection();
    paquetesSalientes = new XYSeriesCollection();
    paquetesDescartados = new XYSeriesCollection();
    salientesMPLS = new XYSeries(TStats.MPLS);
    salientesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    salientesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    salientesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    salientesTLDP = new XYSeries(TStats.TLDP);
    salientesGPSRP = new XYSeries(TStats.GPSRP);
    entrantesMPLS = new XYSeries(TStats.MPLS);
    entrantesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    entrantesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    entrantesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    entrantesTLDP = new XYSeries(TStats.TLDP);
    entrantesGPSRP = new XYSeries(TStats.GPSRP);
    descartadosMPLS = new XYSeries(TStats.MPLS);
    descartadosMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    descartadosMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    descartadosMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    descartadosTLDP = new XYSeries(TStats.TLDP);
    descartadosGPSRP = new XYSeries(TStats.GPSRP);
    tEMPLS = 0;
    tEMPLS_GOS1 = 0;
    tEMPLS_GOS2 = 0;
    tEMPLS_GOS3 = 0;
    tETLDP = 0;
    tEGPSRP = 0;
    tSMPLS = 0;
    tSMPLS_GOS1 = 0;
    tSMPLS_GOS2 = 0;
    tSMPLS_GOS3 = 0;
    tSTLDP = 0;
    tSGPSRP = 0;
    tDMPLS = 0;
    tDMPLS_GOS1 = 0;
    tDMPLS_GOS2 = 0;
    tDMPLS_GOS3 = 0;
    tDTLDP = 0;
    tDGPSRP = 0;
}

From source file:simMPLS.scenario.TLSRAStats.java

/**
 * Crea una nueva instancia de TEstadisticasLSRA
 * @since 1.0//ww w .  j  ava2  s .co m
 */
public TLSRAStats() {
    paquetesEntrantes = new XYSeriesCollection();
    paquetesSalientes = new XYSeriesCollection();
    paquetesDescartados = new XYSeriesCollection();
    salientesMPLS = new XYSeries(TStats.MPLS);
    salientesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    salientesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    salientesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    salientesTLDP = new XYSeries(TStats.TLDP);
    salientesGPSRP = new XYSeries(TStats.GPSRP);
    entrantesMPLS = new XYSeries(TStats.MPLS);
    entrantesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    entrantesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    entrantesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    entrantesTLDP = new XYSeries(TStats.TLDP);
    entrantesGPSRP = new XYSeries(TStats.GPSRP);
    descartadosMPLS = new XYSeries(TStats.MPLS);
    descartadosMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    descartadosMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    descartadosMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    descartadosTLDP = new XYSeries(TStats.TLDP);
    descartadosGPSRP = new XYSeries(TStats.GPSRP);
    tEMPLS = 0;
    tEMPLS_GOS1 = 0;
    tEMPLS_GOS2 = 0;
    tEMPLS_GOS3 = 0;
    tETLDP = 0;
    tEGPSRP = 0;
    tSMPLS = 0;
    tSMPLS_GOS1 = 0;
    tSMPLS_GOS2 = 0;
    tSMPLS_GOS3 = 0;
    tSTLDP = 0;
    tSGPSRP = 0;
    tDMPLS = 0;
    tDMPLS_GOS1 = 0;
    tDMPLS_GOS2 = 0;
    tDMPLS_GOS3 = 0;
    tDTLDP = 0;
    tDGPSRP = 0;
    retransmisionesAtendidas = new DefaultCategoryDataset();
    solicitudesRecibidas = 0;
    retransmisionesRealizadas = 0;
    retransmisionesNoRealizadas = 0;
    recuperacionesLocales = new DefaultCategoryDataset();
    paquetesGoSPerdido = 0;
    solicitudesEmitidas = 0;
    paquetesGoSRecuperados = 0;
    paquetesGoSNoRecuperados = 0;
}

From source file:simMPLS.scenario.TLERStats.java

/**
 * Crea una nueva instancia de TEstadisticasLER
 * @since 1.0//  w ww  .  j av  a 2s  .c  o  m
 */
public TLERStats() {
    paquetesEntrantes = new XYSeriesCollection();
    paquetesSalientes = new XYSeriesCollection();
    paquetesDescartados = new XYSeriesCollection();
    salientesIPv4 = new XYSeries(TStats.IPV4);
    salientesIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    salientesIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    salientesIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    salientesMPLS = new XYSeries(TStats.MPLS);
    salientesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    salientesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    salientesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    salientesTLDP = new XYSeries(TStats.TLDP);
    salientesGPSRP = new XYSeries(TStats.GPSRP);
    entrantesIPv4 = new XYSeries(TStats.IPV4);
    entrantesIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    entrantesIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    entrantesIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    entrantesMPLS = new XYSeries(TStats.MPLS);
    entrantesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    entrantesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    entrantesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    entrantesTLDP = new XYSeries(TStats.TLDP);
    entrantesGPSRP = new XYSeries(TStats.GPSRP);
    descartadosIPv4 = new XYSeries(TStats.IPV4);
    descartadosIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    descartadosIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    descartadosIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    descartadosMPLS = new XYSeries(TStats.MPLS);
    descartadosMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    descartadosMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    descartadosMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    descartadosTLDP = new XYSeries(TStats.TLDP);
    descartadosGPSRP = new XYSeries(TStats.GPSRP);
    tEIPV4 = 0;
    tEIPV4_GOS1 = 0;
    tEIPV4_GOS2 = 0;
    tEIPV4_GOS3 = 0;
    tEMPLS = 0;
    tEMPLS_GOS1 = 0;
    tEMPLS_GOS2 = 0;
    tEMPLS_GOS3 = 0;
    tETLDP = 0;
    tEGPSRP = 0;
    tSIPV4 = 0;
    tSIPV4_GOS1 = 0;
    tSIPV4_GOS2 = 0;
    tSIPV4_GOS3 = 0;
    tSMPLS = 0;
    tSMPLS_GOS1 = 0;
    tSMPLS_GOS2 = 0;
    tSMPLS_GOS3 = 0;
    tSTLDP = 0;
    tSGPSRP = 0;
    tDIPV4 = 0;
    tDIPV4_GOS1 = 0;
    tDIPV4_GOS2 = 0;
    tDIPV4_GOS3 = 0;
    tDMPLS = 0;
    tDMPLS_GOS1 = 0;
    tDMPLS_GOS2 = 0;
    tDMPLS_GOS3 = 0;
    tDTLDP = 0;
    tDGPSRP = 0;
}

From source file:simMPLS.scenario.TLERAStats.java

/**
 * Crea una nueva instancia de TEstadisticasLERA
 * @since 1.0// w ww .j a va 2 s . co m
 */
public TLERAStats() {
    paquetesEntrantes = new XYSeriesCollection();
    paquetesSalientes = new XYSeriesCollection();
    paquetesDescartados = new XYSeriesCollection();
    salientesIPv4 = new XYSeries(TStats.IPV4);
    salientesIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    salientesIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    salientesIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    salientesMPLS = new XYSeries(TStats.MPLS);
    salientesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    salientesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    salientesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    salientesTLDP = new XYSeries(TStats.TLDP);
    salientesGPSRP = new XYSeries(TStats.GPSRP);
    entrantesIPv4 = new XYSeries(TStats.IPV4);
    entrantesIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    entrantesIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    entrantesIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    entrantesMPLS = new XYSeries(TStats.MPLS);
    entrantesMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    entrantesMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    entrantesMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    entrantesTLDP = new XYSeries(TStats.TLDP);
    entrantesGPSRP = new XYSeries(TStats.GPSRP);
    descartadosIPv4 = new XYSeries(TStats.IPV4);
    descartadosIPv4_GOS1 = new XYSeries(TStats.IPV4_GOS1);
    descartadosIPv4_GOS2 = new XYSeries(TStats.IPV4_GOS2);
    descartadosIPv4_GOS3 = new XYSeries(TStats.IPV4_GOS3);
    descartadosMPLS = new XYSeries(TStats.MPLS);
    descartadosMPLS_GOS1 = new XYSeries(TStats.MPLS_GOS1);
    descartadosMPLS_GOS2 = new XYSeries(TStats.MPLS_GOS2);
    descartadosMPLS_GOS3 = new XYSeries(TStats.MPLS_GOS3);
    descartadosTLDP = new XYSeries(TStats.TLDP);
    descartadosGPSRP = new XYSeries(TStats.GPSRP);
    tEIPV4 = 0;
    tEIPV4_GOS1 = 0;
    tEIPV4_GOS2 = 0;
    tEIPV4_GOS3 = 0;
    tEMPLS = 0;
    tEMPLS_GOS1 = 0;
    tEMPLS_GOS2 = 0;
    tEMPLS_GOS3 = 0;
    tETLDP = 0;
    tEGPSRP = 0;
    tSIPV4 = 0;
    tSIPV4_GOS1 = 0;
    tSIPV4_GOS2 = 0;
    tSIPV4_GOS3 = 0;
    tSMPLS = 0;
    tSMPLS_GOS1 = 0;
    tSMPLS_GOS2 = 0;
    tSMPLS_GOS3 = 0;
    tSTLDP = 0;
    tSGPSRP = 0;
    tDIPV4 = 0;
    tDIPV4_GOS1 = 0;
    tDIPV4_GOS2 = 0;
    tDIPV4_GOS3 = 0;
    tDMPLS = 0;
    tDMPLS_GOS1 = 0;
    tDMPLS_GOS2 = 0;
    tDMPLS_GOS3 = 0;
    tDTLDP = 0;
    tDGPSRP = 0;
    retransmisionesAtendidas = new DefaultCategoryDataset();
    solicitudesRecibidas = 0;
    retransmisionesRealizadas = 0;
    retransmisionesNoRealizadas = 0;
    recuperacionesLocales = new DefaultCategoryDataset();
    paquetesGoSPerdido = 0;
    solicitudesEmitidas = 0;
    paquetesGoSRecuperados = 0;
    paquetesGoSNoRecuperados = 0;
}

From source file:com.sixrr.metrics.ui.charts.DistributionDialog.java

private XYSeriesCollection createDistributionSeries() {
    final double[] strippedData = GraphUtils.stripNulls(datapoints);

    final XYSeries series = new XYSeries(metricName);
    Arrays.sort(strippedData);// w w  w  . j ava2 s.c o m
    if (strippedData[0] != 0.0) {
        series.add(0.0, 0.0);
    }
    for (int i = 0; i < strippedData.length; i++) {
        int j = i + 1;
        while (j < strippedData.length && strippedData[i] == strippedData[j]) {
            i++;
            j++;
        }
        series.add(strippedData[i], (double) (i + 1) * 100.0 / (double) strippedData.length);
    }
    return new XYSeriesCollection(series);
}

From source file:com.sixrr.metrics.ui.charts.DiffDistributionDialog.java

private XYSeriesCollection createDistributionSeries() {

    final double[] strippedDataPoints = GraphUtils.stripNulls(datapoints);
    final XYSeries series = new XYSeries(metricName);
    Arrays.sort(strippedDataPoints);
    if (strippedDataPoints[0] != 0.0) {
        series.add(0.0, 0.0);/*  w w  w  .j av  a2  s. c  o m*/
    }
    for (int i = 0; i < strippedDataPoints.length; i++) {
        int j = i + 1;
        while (j < strippedDataPoints.length && strippedDataPoints[i] == strippedDataPoints[j]) {
            i++;
            j++;
        }
        series.add(strippedDataPoints[i], (double) (i + 1) * 100.0 / (double) strippedDataPoints.length);
    }
    final XYSeriesCollection seriesCollection = new XYSeriesCollection();
    seriesCollection.addSeries(series);
    final double[] strippedPrevDataPoints = GraphUtils.stripNulls(prevDatapoints);
    final XYSeries prevSeries = new XYSeries(MetricsReloadedBundle.message("previous") + " " + metricName);
    Arrays.sort(strippedPrevDataPoints);
    if (strippedPrevDataPoints[0] != 0.0) {
        prevSeries.add(0.0, 0.0);
    }
    for (int i = 0; i < strippedPrevDataPoints.length; i++) {
        int j = i + 1;
        while (j < strippedPrevDataPoints.length && strippedPrevDataPoints[i] == strippedPrevDataPoints[j]) {
            i++;
            j++;
        }
        prevSeries.add(strippedPrevDataPoints[i],
                (double) (i + 1) * 100.0 / (double) strippedPrevDataPoints.length);
    }
    seriesCollection.addSeries(prevSeries);
    return seriesCollection;
}

From source file:de.berlios.statcvs.xml.report.CommitActivityChart.java

/**
 * @param settings//from  w w  w.  j  a v  a 2  s .  c om
 * @param defaultFilename
 * @param defaultSubtitle
 */
public CommitActivityChart(CvsContent content, ReportSettings settings) {
    super(settings, "commitactivity%1.png", I18n.tr("Commit Activity%1"));

    Grouper grouper = settings.getGrouper(new AuthorGrouper());
    Map seriesByGroup = new HashMap();

    XYSeries series = createXYSeries(grouper.getName() + " " + I18n.tr("(All)"),
            settings.getRevisionIterator(content));
    XYDataset dataset = new XYSeriesCollection(series);
    addPlot(createPlot(dataset, series.getName()));

    Iterator it = settings.getRevisionIterator(content);
    while (it.hasNext()) {
        CvsRevision rev = (CvsRevision) it.next();
        Object group = grouper.getGroup(rev);
        XYSeries groupSeries = (XYSeries) seriesByGroup.get(group);
        if (groupSeries == null) {
            groupSeries = new XYSeries(grouper.getName(group));
            seriesByGroup.put(group, groupSeries);
        }
        addToXYSeries(groupSeries, rev);
    }

    Iterator it2 = seriesByGroup.keySet().iterator();
    while (it2.hasNext()) {
        Object group = it2.next();
        dataset = new XYSeriesCollection((XYSeries) seriesByGroup.get(group));
        addPlot(createPlot(dataset, grouper.getName(group)));
    }

    setup(false);
}