public BgGraphBuilder(Context context, long start, long end, int numValues) {
   end_time = end;
   start_time = start;
   bgReadings = BgReading.latestForGraph(numValues, start, end);
   calibrations = Calibration.latestForGraph(numValues, start, end);
   this.context = context;
   this.prefs = PreferenceManager.getDefaultSharedPreferences(context);
   this.highMark = Double.parseDouble(prefs.getString("highValue", "170"));
   this.lowMark = Double.parseDouble(prefs.getString("lowValue", "70"));
   this.doMgdl = (prefs.getString("units", "mgdl").equals("mgdl"));
   defaultMinY = unitized(40);
   defaultMaxY = unitized(250);
   pointSize = isXLargeTablet(context) ? 5 : 3;
   axisTextSize = isXLargeTablet(context) ? 20 : Axis.DEFAULT_TEXT_SIZE_SP;
   previewAxisTextSize = isXLargeTablet(context) ? 12 : 5;
   hoursPreviewStep = isXLargeTablet(context) ? 2 : 1;
 }