public void setupChart() {
      basalvsTempBasalChart.setZoomType(ZoomType.HORIZONTAL);
      basalvsTempBasalChart.setLineChartData(extendedGraphBuilder.basalvsTempBasalData());

      Viewport iobv =
          new Viewport(
              basalvsTempBasalChart
                  .getMaximumViewport()); // Sets the min and max for Top and Bottom of the
                                          // viewpoint
      iobv.top = extendedGraphBuilder.maxBasal.floatValue();
      iobv.bottom = -(extendedGraphBuilder.maxBasal.floatValue() - 1);
      basalvsTempBasalChart.setMaximumViewport(iobv);
      iobv.left = previewChart.getCurrentViewport().left;
      iobv.right = previewChart.getCurrentViewport().right;
      basalvsTempBasalChart.setCurrentViewport(iobv);

      basalvsTempBasalChart.setViewportCalculationEnabled(true);
      // iobcobPastChart.setViewportChangeListener(new ChartViewPortListener());
      // //causes a crash, no idea why #// TODO: 28/08/2015
    }
    public void setupChart() {

      iobcobPastChart.setZoomType(ZoomType.HORIZONTAL);
      iobcobPastChart.setLineChartData(extendedGraphBuilder.iobcobPastLineData());

      Viewport iobv =
          new Viewport(
              iobcobPastChart
                  .getMaximumViewport()); // Sets the min and max for Top and Bottom of the
                                          // viewpoint
      iobv.top = Float.parseFloat(extendedGraphBuilder.yCOBMax.toString());
      iobv.bottom = Float.parseFloat(extendedGraphBuilder.yCOBMin.toString());
      iobcobPastChart.setMaximumViewport(iobv);
      iobv.left = previewChart.getCurrentViewport().left;
      iobv.right = previewChart.getCurrentViewport().right;
      iobcobPastChart.setCurrentViewport(iobv);

      iobcobPastChart.setViewportCalculationEnabled(true);
      // iobcobPastChart.setViewportChangeListener(new ChartViewPortListener());
      // //causes a crash, no idea why #// TODO: 28/08/2015
    }