|
|
@ -98,11 +98,14 @@ function getChartScaleRange(){ |
|
|
|
function getProgressLine(){ |
|
|
|
function getProgressLine(){ |
|
|
|
// As long as the progress data length is same with chart scale range (period) then it's fine.
|
|
|
|
// As long as the progress data length is same with chart scale range (period) then it's fine.
|
|
|
|
getSCurveData(); |
|
|
|
getSCurveData(); |
|
|
|
|
|
|
|
// console.log("apa ", return_first);
|
|
|
|
var cumulativePlannedDurations = return_first.data[0].data.percentagePlan; |
|
|
|
var cumulativePlannedDurations = return_first.data[0].data.percentagePlan; |
|
|
|
var cumulativeRealDurations = return_first.data[0].data.percentageReal; |
|
|
|
var cumulativeRealDurations = return_first.data[0].data.percentageReal; |
|
|
|
|
|
|
|
cumulativeRealDurations[cumulativeRealDurations.length - 1] = Math.ceil(cumulativeRealDurations[cumulativeRealDurations.length - 1]); |
|
|
|
var maxPlan = cumulativePlannedDurations[cumulativePlannedDurations.length - 1] |
|
|
|
var maxPlan = cumulativePlannedDurations[cumulativePlannedDurations.length - 1] |
|
|
|
var maxReal = cumulativeRealDurations[cumulativeRealDurations.length - 1] |
|
|
|
var maxReal = cumulativeRealDurations[cumulativeRealDurations.length - 1] |
|
|
|
var dates = return_first.data[0].data.date; |
|
|
|
var dates = return_first.data[0].data.date; |
|
|
|
|
|
|
|
//jika summary s curve
|
|
|
|
if (maxReal > 100 || maxPlan > 100) { |
|
|
|
if (maxReal > 100 || maxPlan > 100) { |
|
|
|
var plannedDurations = cumulativePlannedDurations.map((item) => { |
|
|
|
var plannedDurations = cumulativePlannedDurations.map((item) => { |
|
|
|
return item/maxPlan*100; |
|
|
|
return item/maxPlan*100; |
|
|
|