下面列出了com.google.gson.internal.bind.DateTypeAdapter#com.eveningoutpost.dexdrip.UtilityModels.BgGraphBuilder 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private void resendData() {
if(googleApiClient != null && !googleApiClient.isConnected() && !googleApiClient.isConnecting()) { googleApiConnect(); }
long startTime = new Date().getTime() - (60000 * 60 * 24);
BgReading last_bg = BgReading.last();
List<BgReading> graph_bgs = BgReading.latestForGraph(60, startTime);
BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(getApplicationContext());
if (!graph_bgs.isEmpty()) {
DataMap entries = dataMap(last_bg, mPrefs, bgGraphBuilder);
final ArrayList<DataMap> dataMaps = new ArrayList<>(graph_bgs.size());
for (BgReading bg : graph_bgs) {
dataMaps.add(dataMap(bg, mPrefs, bgGraphBuilder));
}
entries.putDataMapArrayList("entries", dataMaps);
new SendToDataLayerThread(WEARABLE_DATA_PATH, googleApiClient).execute(entries);
}
}
public BgReading injectNoise(boolean save) {
final BgReading bgReading = this;
if (JoH.msSince(bgReading.timestamp) > Constants.MINUTE_IN_MS * 20) {
bgReading.noise = "0";
} else {
BgGraphBuilder.refreshNoiseIfOlderThan(bgReading.timestamp);
if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_HIGH) {
bgReading.noise = "4";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TOO_HIGH_FOR_PREDICT) {
bgReading.noise = "3";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER) {
bgReading.noise = "2";
}
}
if (save) bgReading.save();
return bgReading;
}
private static void processBacksies(List<BackFillStream.Backsie> backsies) {
boolean changed = false;
for (BackFillStream.Backsie backsie : backsies) {
final long time = DexTimeKeeper.fromDexTime(getTransmitterID(), backsie.getDextime());
final long since = JoH.msSince(time);
if ((since > HOUR_IN_MS * 6) || (since < 0)) {
UserError.Log.wtf(TAG, "Backfill timestamp unrealistic: " + JoH.dateTimeText(time) + " (ignored)");
} else {
if (BgReading.getForPreciseTimestamp(time, Constants.MINUTE_IN_MS * 4) == null) {
final BgReading bgr = BgReading.bgReadingInsertFromG5(backsie.getGlucose(), time, "Backfill");
lastGlucoseBgReading = bgr;
UserError.Log.d(TAG, "Adding backfilled reading: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
changed = true;
}
UserError.Log.d(TAG, "Backsie: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
}
}
if (changed) {
updateStreamedTillTimeForBackfill();
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//KS if (Home.get_holo()) { setTheme(R.style.OldAppTheme); }
setContentView(R.layout.activity_snooze);
alertStatus = (TextView) findViewById(R.id.alert_status);
snoozeValue = (NumberPicker) findViewById(R.id.snooze);
prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
doMgdl = (prefs.getString("units", "mgdl").compareTo("mgdl") == 0);
addListenerOnButton();
if(BgGraphBuilder.isXLargeTablet(getApplicationContext())) {
alertStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
buttonSnooze.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
}
displayStatus();
}
public void setupCharts() {
bgGraphBuilder = new BgGraphBuilder(this);
updateStuff = false;
chart = (LineChartView) findViewById(R.id.chart);
chart.setZoomType(ZoomType.HORIZONTAL);
previewChart = (PreviewLineChartView) findViewById(R.id.chart_preview);
previewChart.setZoomType(ZoomType.HORIZONTAL);
chart.setLineChartData(bgGraphBuilder.lineData());
previewChart.setLineChartData(bgGraphBuilder.previewLineData());
updateStuff = true;
previewChart.setViewportCalculationEnabled(true);
chart.setViewportCalculationEnabled(true);
previewChart.setViewportChangeListener(new ViewportListener());
chart.setViewportChangeListener(new ChartViewPortListener());
setViewport();
}
public BgReading injectNoise(boolean save) {
final BgReading bgReading = this;
if (JoH.msSince(bgReading.timestamp) > Constants.MINUTE_IN_MS * 20) {
bgReading.noise = "0";
} else {
BgGraphBuilder.refreshNoiseIfOlderThan(bgReading.timestamp);
if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_HIGH) {
bgReading.noise = "4";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TOO_HIGH_FOR_PREDICT) {
bgReading.noise = "3";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER) {
bgReading.noise = "2";
}
}
if (save) bgReading.save();
return bgReading;
}
private static void processBacksies(List<BackFillStream.Backsie> backsies) {
boolean changed = false;
for (BackFillStream.Backsie backsie : backsies) {
final long time = DexTimeKeeper.fromDexTime(getTransmitterID(), backsie.getDextime());
final long since = JoH.msSince(time);
if ((since > HOUR_IN_MS * 6) || (since < 0)) {
UserError.Log.wtf(TAG, "Backfill timestamp unrealistic: " + JoH.dateTimeText(time) + " (ignored)");
} else {
if (BgReading.getForPreciseTimestamp(time, Constants.MINUTE_IN_MS * 4) == null) {
final BgReading bgr = BgReading.bgReadingInsertFromG5(backsie.getGlucose(), time, "Backfill");
lastGlucoseBgReading = bgr;
UserError.Log.d(TAG, "Adding backfilled reading: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
changed = true;
}
UserError.Log.d(TAG, "Backsie: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
}
}
if (changed) {
updateStreamedTillTimeForBackfill();
}
}
private void setupCharts() {
dateButton1.setText(dateFormatter.format(date1.getTime()));
Calendar endDate = (GregorianCalendar) date1.clone();
endDate.add(Calendar.DATE, noDays);
int numValues = noDays * (60 / 2) * 24; // LimiTTer sample rate 1 per 2 minutes
BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(this, date1.getTimeInMillis(), endDate.getTimeInMillis(), numValues, false);
chart = (LineChartView) findViewById(R.id.chart);
chart.setZoomType(ZoomType.HORIZONTAL);
previewChart = (PreviewLineChartView) findViewById(R.id.chart_preview);
previewChart.setZoomType(ZoomType.HORIZONTAL);
chart.setLineChartData(bgGraphBuilder.lineData());
chart.setOnValueTouchListener(bgGraphBuilder.getOnValueSelectTooltipListener(this));
previewChart.setLineChartData(bgGraphBuilder.previewLineData(chart.getLineChartData()));
previewChart.setViewportCalculationEnabled(true);
chart.setViewportCalculationEnabled(true);
previewChart.setViewportChangeListener(new ViewportListener());
chart.setViewportChangeListener(new ChartViewPortListener());
setupStatistics(date1.getTimeInMillis(), endDate.getTimeInMillis());
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_snooze);
alertStatus = (TextView) findViewById(R.id.alert_status);
snoozeValue = (NumberPicker) findViewById(R.id.snooze);
prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
doMgdl = (prefs.getString("units", "mgdl").compareTo("mgdl") == 0);
addListenerOnButton();
if(BgGraphBuilder.isXLargeTablet(getApplicationContext())) {
alertStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
buttonSnooze.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
}
displayStatus();
}
private void resendData(long since) {
Log.d(TAG, "resendData ENTER");
forceGoogleApiConnect();
final long startTime = since == 0 ? new Date().getTime() - (60000 * 60 * 24) : since;
Log.d(TAG, "resendData googleApiClient connected ENTER, sending since: " + JoH.dateTimeText(startTime));
final BgReading last_bg = BgReading.last();
if (last_bg != null) {
List<BgReading> graph_bgs = BgReading.latestForGraph(60, startTime);
BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(getApplicationContext());
if (!graph_bgs.isEmpty()) {
final int battery = PowerStateReceiver.getBatteryLevel(getApplicationContext());
DataMap entries = dataMap(last_bg, mPrefs, bgGraphBuilder, battery);
final ArrayList<DataMap> dataMaps = new ArrayList<>(graph_bgs.size());
for (BgReading bg : graph_bgs) {
dataMaps.add(dataMap(bg, mPrefs, bgGraphBuilder, battery));
}
entries.putLong("time", new Date().getTime()); // MOST IMPORTANT LINE FOR TIMESTAMP
entries.putDataMapArrayList("entries", dataMaps);
if (mPrefs.getBoolean("extra_status_line", false)) {
entries.putString("extra_status_line", StatusLine.extraStatusLine());
}
new SendToDataLayerThread(WEARABLE_DATA_PATH, googleApiClient).executeOnExecutor(xdrip.executor, entries);
}
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Home.get_holo()) { setTheme(R.style.OldAppThemeNoTitleBar); }
JoH.fixActionBar(this);
setContentView(R.layout.activity_snooze);
alertStatus = (TextView) findViewById(R.id.alert_status);
snoozeValue = (NumberPicker) findViewById(R.id.snooze);
prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
doMgdl = (prefs.getString("units", "mgdl").compareTo("mgdl") == 0);
addListenerOnButton();
if(BgGraphBuilder.isXLargeTablet(getApplicationContext())) {
alertStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
buttonSnooze.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
}
displayStatus();
}
public BgReading injectNoise(boolean save) {
final BgReading bgReading = this;
if (JoH.msSince(bgReading.timestamp) > Constants.MINUTE_IN_MS * 20) {
bgReading.noise = "0";
} else {
BgGraphBuilder.refreshNoiseIfOlderThan(bgReading.timestamp);
if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_HIGH) {
bgReading.noise = "4";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TOO_HIGH_FOR_PREDICT) {
bgReading.noise = "3";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER) {
bgReading.noise = "2";
}
}
if (save) bgReading.save();
return bgReading;
}
private static void processBacksies(List<BackFillStream.Backsie> backsies) {
boolean changed = false;
for (BackFillStream.Backsie backsie : backsies) {
final long time = DexTimeKeeper.fromDexTime(getTransmitterID(), backsie.getDextime());
final long since = JoH.msSince(time);
if ((since > HOUR_IN_MS * 6) || (since < 0)) {
UserError.Log.wtf(TAG, "Backfill timestamp unrealistic: " + JoH.dateTimeText(time) + " (ignored)");
} else {
if (BgReading.getForPreciseTimestamp(time, Constants.MINUTE_IN_MS * 4) == null) {
final BgReading bgr = BgReading.bgReadingInsertFromG5(backsie.getGlucose(), time, "Backfill");
lastGlucoseBgReading = bgr;
UserError.Log.d(TAG, "Adding backfilled reading: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
changed = true;
}
UserError.Log.d(TAG, "Backsie: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
}
}
if (changed) {
updateStreamedTillTimeForBackfill();
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//KS if (Home.get_holo()) { setTheme(R.style.OldAppTheme); }
setContentView(R.layout.activity_snooze);
alertStatus = (TextView) findViewById(R.id.alert_status);
snoozeValue = (NumberPicker) findViewById(R.id.snooze);
prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
doMgdl = (prefs.getString("units", "mgdl").compareTo("mgdl") == 0);
addListenerOnButton();
if(BgGraphBuilder.isXLargeTablet(getApplicationContext())) {
alertStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
buttonSnooze.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
}
displayStatus();
}
public BgReading injectNoise(boolean save) {
final BgReading bgReading = this;
if (JoH.msSince(bgReading.timestamp) > Constants.MINUTE_IN_MS * 20) {
bgReading.noise = "0";
} else {
BgGraphBuilder.refreshNoiseIfOlderThan(bgReading.timestamp);
if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_HIGH) {
bgReading.noise = "4";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TOO_HIGH_FOR_PREDICT) {
bgReading.noise = "3";
} else if (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER) {
bgReading.noise = "2";
}
}
if (save) bgReading.save();
return bgReading;
}
private static void processBacksies(List<BackFillStream.Backsie> backsies) {
boolean changed = false;
for (BackFillStream.Backsie backsie : backsies) {
final long time = DexTimeKeeper.fromDexTime(getTransmitterID(), backsie.getDextime());
final long since = JoH.msSince(time);
if ((since > HOUR_IN_MS * 6) || (since < 0)) {
UserError.Log.wtf(TAG, "Backfill timestamp unrealistic: " + JoH.dateTimeText(time) + " (ignored)");
} else {
if (BgReading.getForPreciseTimestamp(time, Constants.MINUTE_IN_MS * 4) == null) {
final BgReading bgr = BgReading.bgReadingInsertFromG5(backsie.getGlucose(), time, "Backfill");
lastGlucoseBgReading = bgr;
UserError.Log.d(TAG, "Adding backfilled reading: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
changed = true;
}
UserError.Log.d(TAG, "Backsie: " + JoH.dateTimeText(time) + " " + BgGraphBuilder.unitized_string_static(backsie.getGlucose()));
}
}
if (changed) {
updateStreamedTillTimeForBackfill();
}
}
private void setupCharts() {
dateButton1.setText(dateFormatter.format(date1.getTime()));
Calendar endDate = (GregorianCalendar) date1.clone();
endDate.add(Calendar.DATE, noDays);
int numValues = noDays * (60 / 2) * 24; // LimiTTer sample rate 1 per 2 minutes
BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(this, date1.getTimeInMillis(), endDate.getTimeInMillis(), numValues, false);
chart = (LineChartView) findViewById(R.id.chart);
chart.setZoomType(ZoomType.HORIZONTAL);
previewChart = (PreviewLineChartView) findViewById(R.id.chart_preview);
previewChart.setZoomType(ZoomType.HORIZONTAL);
chart.setLineChartData(bgGraphBuilder.lineData());
chart.setOnValueTouchListener(bgGraphBuilder.getOnValueSelectTooltipListener(this));
previewChart.setLineChartData(bgGraphBuilder.previewLineData(chart.getLineChartData()));
previewChart.setViewportCalculationEnabled(true);
chart.setViewportCalculationEnabled(true);
previewChart.setViewportChangeListener(new ViewportListener());
chart.setViewportChangeListener(new ChartViewPortListener());
setupStatistics(date1.getTimeInMillis(), endDate.getTimeInMillis());
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Home.get_holo()) { setTheme(R.style.OldAppThemeNoTitleBar); }
JoH.fixActionBar(this);
setContentView(R.layout.activity_snooze);
alertStatus = (TextView) findViewById(R.id.alert_status);
snoozeValue = (NumberPicker) findViewById(R.id.snooze);
prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
doMgdl = (prefs.getString("units", "mgdl").compareTo("mgdl") == 0);
addListenerOnButton();
if(BgGraphBuilder.isXLargeTablet(getApplicationContext())) {
alertStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
buttonSnooze.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30);
}
displayStatus();
}
private void setupCharts() {
dateButton1.setText(dateFormatter.format(date1.getTime()));
Calendar endDate = (GregorianCalendar) date1.clone();
endDate.add(Calendar.DATE, noDays);
int numValues = noDays * (60 / 5) * 24;
BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(this, date1.getTimeInMillis(), endDate.getTimeInMillis(), numValues);
chart = (LineChartView) findViewById(R.id.chart);
chart.setZoomType(ZoomType.HORIZONTAL);
previewChart = (PreviewLineChartView) findViewById(R.id.chart_preview);
previewChart.setZoomType(ZoomType.HORIZONTAL);
chart.setLineChartData(bgGraphBuilder.lineData());
chart.setOnValueTouchListener(bgGraphBuilder.getOnValueSelectTooltipListener());
previewChart.setLineChartData(bgGraphBuilder.previewLineData());
previewChart.setViewportCalculationEnabled(true);
chart.setViewportCalculationEnabled(true);
previewChart.setViewportChangeListener(new ViewportListener());
chart.setViewportChangeListener(new ChartViewPortListener());
}
protected static boolean compensateNoise() {
return (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER
|| (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER_ULTRASENSITIVE
&& Pref.getBooleanDefaultFalse("engineering_mode")
&& Pref.getBooleanDefaultFalse("bg_compensate_noise_ultrasensitive")
))
&& (BgGraphBuilder.best_bg_estimate > 0)
&& (BgGraphBuilder.last_bg_estimate > 0)
&& (prefs.getBoolean("bg_compensate_noise", false));
}
public static String unitizedDeltaString(boolean showUnit, boolean highGranularity, boolean doMgdl, double value1, long timestamp1, double value2, long timestamp2) {
// timestamps invalid or too far apart return ???
if ((timestamp1 < 0)
|| (timestamp2 < 0)
|| (value1 < 0)
|| (value2 < 0)
|| (timestamp2 > timestamp1)
|| (timestamp1 - timestamp2 > (20 * 60 * 1000)))
return "???";
double value = calculateSlope(value1, timestamp1, value2, timestamp2) * 5 * 60 * 1000;
return BgGraphBuilder.unitizedDeltaStringRaw(showUnit, highGranularity, value, doMgdl);
}
protected static boolean compensateNoise() {
return (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER
|| (BgGraphBuilder.last_noise > BgGraphBuilder.NOISE_TRIGGER_ULTRASENSITIVE
&& Pref.getBooleanDefaultFalse("engineering_mode")
&& Pref.getBooleanDefaultFalse("bg_compensate_noise_ultrasensitive")
))
&& (BgGraphBuilder.best_bg_estimate > 0)
&& (BgGraphBuilder.last_bg_estimate > 0)
&& (prefs.getBoolean("bg_compensate_noise", false));
}
public static String unitizedDeltaString(boolean showUnit, boolean highGranularity, boolean doMgdl, double value1, long timestamp1, double value2, long timestamp2) {
// timestamps invalid or too far apart return ???
if ((timestamp1 < 0)
|| (timestamp2 < 0)
|| (value1 < 0)
|| (value2 < 0)
|| (timestamp2 > timestamp1)
|| (timestamp1 - timestamp2 > (20 * 60 * 1000)))
return "???";
double value = calculateSlope(value1, timestamp1, value2, timestamp2) * 5 * 60 * 1000;
return BgGraphBuilder.unitizedDeltaStringRaw(showUnit, highGranularity, value, doMgdl);
}
static List<StatusItem> megaStatus() {
final List<StatusItem> l = new ArrayList<>();
for (Map.Entry<String, String> entry : hostStatus.entrySet()) {
final long status_time = hostStatusTime.get(entry.getKey());
if (entry.getValue().length() > 0)
l.add(new StatusItem(entry.getKey(), entry.getValue() + ((status_time != 0) ? (" " + JoH.niceTimeSince(status_time) + " " + "ago") : ""), JoH.msSince(status_time) <= BgGraphBuilder.DEXCOM_PERIOD ? StatusItem.Highlight.GOOD : JoH.msSince(status_time) <= BgGraphBuilder.DEXCOM_PERIOD * 2 ? StatusItem.Highlight.NOTICE : StatusItem.Highlight.NORMAL));
}
return l;
}
static List<StatusItem> megaStatus() {
final List<StatusItem> l = new ArrayList<>();
for (Map.Entry<String, String> entry : hostStatus.entrySet()) {
final long status_time = hostStatusTime.get(entry.getKey());
if (entry.getValue().length() > 0)
l.add(new StatusItem(entry.getKey(), entry.getValue() + ((status_time != 0) ? (" " + JoH.niceTimeSince(status_time) + " " + "ago") : ""), JoH.msSince(status_time) <= BgGraphBuilder.DEXCOM_PERIOD ? StatusItem.Highlight.GOOD : JoH.msSince(status_time) <= BgGraphBuilder.DEXCOM_PERIOD * 2 ? StatusItem.Highlight.NOTICE : StatusItem.Highlight.NORMAL));
}
return l;
}
protected void refreshView(View view) {
LineChartView chart = (LineChartView) view.findViewById(R.id.example_linechart);
BgGraphBuilder bgGraphBuilder = new BgGraphBuilder(getContext());
chart.setLineChartData(bgGraphBuilder.lineData());
Viewport viewport = chart.getMaximumViewport();
chart.setViewportCalculationEnabled(false);
chart.setInteractive(false);
chart.setCurrentViewport(viewport);
chart.setPadding(0, 0, 0, 0);
chart.setLeft(0);
chart.setTop(0);
Log.d(TAG, "onBindExampleChart: refreshview " + chart.getHeight());
}
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
bgGraphBuilder = new BgGraphBuilder(context);
initPebbleDisplays();
PebbleUtil.pebbleDisplayType = getCurrentBroadcastToPebbleSetting();
Log.d(TAG,"onCreate for: "+PebbleUtil.pebbleDisplayType.toString());
currentWatchFaceUUID = getActivePebbleDisplay().watchfaceUUID();
init();
}
private void addDisplayDelta() {
if (BgGraphBuilder.isXLargeTablet(getApplicationContext())) {
if (Locale.getDefault().getLanguage() == "iw") {
HebrewAppendDisplayData();
} else {
notificationText.append(" ");
notificationText.append(display_delta);
}
} else {
notificationText.append("\n");
notificationText.append(display_delta);
}
}
private Bitmap createWearBitmapSmallDots(long start, long end) {
return new BgSparklineBuilder(xdrip.getAppContext())
.setBgGraphBuilder(new BgGraphBuilder(xdrip.getAppContext()))
.setStart(start)
.setEnd(end)
.showAxes()
.setWidthPx(290)
.setHeightPx(160)
.setSmallDots()
.build();
}
private Bitmap createWFBitmapTinyDots(long start, long end) {
return new BgSparklineBuilder(xdrip.getAppContext())
.setBgGraphBuilder(new BgGraphBuilder(xdrip.getAppContext()))
.setStart(start)
.setEnd(end)
//.showAxes()
.setWidthPx(300)
.setHeightPx(130)
.setTinyDots()
.build();
}