List of usage examples for org.jfree.data.xy XYSeries XYSeries
public XYSeries(Comparable key, boolean autoSort)
From source file:com.googlecode.logVisualizer.chart.MPGainedSpentPerTurnXYBarChart.java
@Override protected IntervalXYDataset createDataset() { final XYSeriesCollection datasets = new XYSeriesCollection(); if (getLogData().isDetailedLog()) { final XYSeries gainedDataset = new XYSeries("MP gained", false); final XYSeries spentDataset = new XYSeries("MP spent", false); for (final SingleTurn st : getLogData().getTurnsSpent()) { gainedDataset.add(st.getTurnNumber(), st.getMPGain().getTotalMPGains()); int spentMP = 0; for (final Skill s : st.getSkillsCast()) spentMP += s.getMpCost(); spentDataset.add(st.getTurnNumber(), spentMP); }/*w w w . j a v a2 s. co m*/ datasets.addSeries(spentDataset); datasets.addSeries(gainedDataset); } return datasets; }
From source file:edu.ucla.stat.SOCR.applications.demo.BlackScholesApplication.java
public void init() { updateGraph();//from w w w . j a va 2s . c o m s_serie = new XYSeries("S", false); upContainer = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(leftPanel), new JScrollPane(chartPanel)); this.getMainPanel().removeAll(); this.getMainPanel().add(new JScrollPane(upContainer), BorderLayout.CENTER); this.getMainPanel().validate(); }