Fix: get db data with date, time
This commit is contained in:
+22
-13
@@ -25,23 +25,32 @@ class Start {
|
||||
// contents
|
||||
this.printHowToPlay(appInfoManager.getHowToPlayText(sessionStorageManager.playingAppName));
|
||||
this.makeStartButton();
|
||||
this.dbConnectManager.requestPlayerHistory( historyRecordManager => {
|
||||
this.printChartBaseLine();
|
||||
let today = new Date();
|
||||
let date = DateUtil.getYYYYMMDD(today);
|
||||
this.dbConnectManager.requestPlayerHistory(
|
||||
date,
|
||||
historyRecordManager => {
|
||||
this.printChartBaseLine();
|
||||
|
||||
let underValue = historyRecordManager.underValueForGraph();
|
||||
let upperValue = historyRecordManager.upperValueForGraph();
|
||||
if(historyRecordManager.count == 0) {
|
||||
console.log("start - history record : no data");
|
||||
return;
|
||||
}
|
||||
|
||||
let minValue = underValue - (upperValue - underValue) / 10;
|
||||
let maxValue = upperValue;// + (upperValue - underValue) / 10;
|
||||
for(let i = 0; i < historyRecordManager.count; i++) {
|
||||
if(i > 6)
|
||||
break;
|
||||
let underValue = historyRecordManager.underValueForGraph();
|
||||
let upperValue = historyRecordManager.upperValueForGraph();
|
||||
|
||||
let data = historyRecordManager.getAt(i);
|
||||
this.drawRecordGraph(i, data.date, data.score, minValue, maxValue);
|
||||
let minValue = underValue - (upperValue - underValue) / 10;
|
||||
let maxValue = upperValue;// + (upperValue - underValue) / 10;
|
||||
for(let i = 0; i < historyRecordManager.count; i++) {
|
||||
if(i > 6)
|
||||
break;
|
||||
|
||||
let data = historyRecordManager.getAt(i);
|
||||
this.drawRecordGraph(i, data.date, data.score, minValue, maxValue);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
);
|
||||
|
||||
|
||||
// bottom
|
||||
|
||||
Reference in New Issue
Block a user