|
|
@ -145,19 +145,22 @@ var lineOverlay = overlayControl.addOverlay(function(container) { |
|
|
|
var values = getProgressLine(); |
|
|
|
var values = getProgressLine(); |
|
|
|
var scaleLabels = []; |
|
|
|
var scaleLabels = []; |
|
|
|
|
|
|
|
|
|
|
|
if(parts[2] && parts[2] == '1'){ |
|
|
|
// if(parts[2] && parts[2] == '1'){
|
|
|
|
|
|
|
|
// values.dates.forEach(function(date){
|
|
|
|
|
|
|
|
// var dateScale = new Date(date);
|
|
|
|
|
|
|
|
// scaleLabels.push(dateToStr(dateScale));
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// var chartScale = getChartScaleRange();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// chartScale.forEach(function(date){
|
|
|
|
|
|
|
|
// scaleLabels.push(dateToStr(date));
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
values.dates.forEach(function(date){ |
|
|
|
values.dates.forEach(function(date){ |
|
|
|
var dateScale = new Date(date); |
|
|
|
var dateScale = new Date(date); |
|
|
|
scaleLabels.push(dateToStr(dateScale)); |
|
|
|
scaleLabels.push(dateToStr(dateScale)); |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
|
|
|
|
var chartScale = getChartScaleRange(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chartScale.forEach(function(date){ |
|
|
|
|
|
|
|
scaleLabels.push(dateToStr(date)); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var canvas = document.createElement("canvas"); |
|
|
|
var canvas = document.createElement("canvas"); |
|
|
|
container.appendChild(canvas); |
|
|
|
container.appendChild(canvas); |
|
|
|
canvas.style.height = container.offsetHeight + "px"; |
|
|
|
canvas.style.height = container.offsetHeight + "px"; |
|
|
|