### Question:
LineChart extends ComparisonChart { @Override public void addValue(double value, double deviation, Comparable seriesName, double xValue, String xString) { YIntervalSeries series = seriesMap.get(seriesName); if (series == null) { seriesMap.put(seriesName, series = new YIntervalSeries(seriesName)); dataset.addSeries(series); } upperRange = Math.max(upperRange, Math.min(value + deviation, 3 * value)); series.add(xValue, value, value - deviation, value + deviation); if (xString != null) { iterationValues.put(xValue, xString); } } LineChart(String domainLabel, String rangeLabel); @Override void addValue(double value, double deviation, Comparable seriesName, double xValue, String xString);  }### Answer:
@Test public void test() { LineChart chart = new LineChart("foos", "bars"); Random random = new Random(); for (int category = 0; category < 3; category++) { double lastValue = 0, lastDev = 1; for (int i = 0; i < 30; ++i) { lastValue = lastValue + (random.nextBoolean() ? 1 : -1); lastDev = lastDev + random.nextDouble() - 0.3; chart.addValue(lastValue, lastDev, "Serie" + category, i, String.valueOf(Math.pow(2, i))); } } try { chart.setHeight(500).setWidth(600).save("/tmp/foobar.png"); } catch (IOException e) { e.printStackTrace(); } }