|
|
|
@ -406,6 +406,15 @@ const DashboardBOD = () => {
|
|
|
|
|
<Bar |
|
|
|
|
options={{ |
|
|
|
|
indexAxis: 'y', |
|
|
|
|
scales: { |
|
|
|
|
x: { |
|
|
|
|
ticks: { |
|
|
|
|
callback: function (value) { |
|
|
|
|
return toRupiah(value, { useUnit: 'jt' }); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
elements: { |
|
|
|
|
bar: { |
|
|
|
|
borderWidth: 2, |
|
|
|
@ -424,7 +433,7 @@ const DashboardBOD = () => {
|
|
|
|
|
datalabels: { |
|
|
|
|
color: '#FFFFFF', |
|
|
|
|
formatter: function(value, context) { |
|
|
|
|
return value ? toRupiah(value, {useUnit: 'jt'}) : 0 |
|
|
|
|
return value ? toRupiah(value, { useUnit: 'jt' }) : 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -489,10 +498,10 @@ const DashboardBOD = () => {
|
|
|
|
|
label: "", |
|
|
|
|
// data: [2, 4, 10],
|
|
|
|
|
data: [ |
|
|
|
|
PROJECT_BY_FINANCIAL_HEALTH && PROJECT_BY_FINANCIAL_HEALTH.overrun ? PROJECT_BY_FINANCIAL_HEALTH.overrun : 0, |
|
|
|
|
PROJECT_BY_FINANCIAL_HEALTH && PROJECT_BY_FINANCIAL_HEALTH.warning ? PROJECT_BY_FINANCIAL_HEALTH.warning : 0, |
|
|
|
|
PROJECT_BY_FINANCIAL_HEALTH && PROJECT_BY_FINANCIAL_HEALTH['on-budget'] ? PROJECT_BY_FINANCIAL_HEALTH['on-budget'] : 0 |
|
|
|
|
], |
|
|
|
|
PROJECT_BY_FINANCIAL_HEALTH && PROJECT_BY_FINANCIAL_HEALTH.overrun ? PROJECT_BY_FINANCIAL_HEALTH.overrun : '', |
|
|
|
|
PROJECT_BY_FINANCIAL_HEALTH && PROJECT_BY_FINANCIAL_HEALTH.warning ? PROJECT_BY_FINANCIAL_HEALTH.warning : '', |
|
|
|
|
PROJECT_BY_FINANCIAL_HEALTH && PROJECT_BY_FINANCIAL_HEALTH['on-budget'] ? PROJECT_BY_FINANCIAL_HEALTH['on-budget'] : '' |
|
|
|
|
].filter(value => value !== null), |
|
|
|
|
borderColor: ["#E80053", "#FFD600", "#52AC0B",], |
|
|
|
|
backgroundColor: ["#E80053", "#FFD600", "#52AC0B",], |
|
|
|
|
borderWidth: 2, |
|
|
|
@ -515,9 +524,9 @@ const DashboardBOD = () => {
|
|
|
|
|
label: "", |
|
|
|
|
// data: [1, 3, 11],
|
|
|
|
|
data: [ |
|
|
|
|
PROJECT_BY_SCHEDULE_HEALTH && PROJECT_BY_SCHEDULE_HEALTH['behind-schedule'] ? PROJECT_BY_SCHEDULE_HEALTH['behind-schedule'] : 0, |
|
|
|
|
PROJECT_BY_SCHEDULE_HEALTH && PROJECT_BY_SCHEDULE_HEALTH.warning ? PROJECT_BY_SCHEDULE_HEALTH.warning : 0, |
|
|
|
|
PROJECT_BY_SCHEDULE_HEALTH && PROJECT_BY_SCHEDULE_HEALTH['on-schedule'] ? PROJECT_BY_SCHEDULE_HEALTH['on-schedule'] : 0 |
|
|
|
|
PROJECT_BY_SCHEDULE_HEALTH && PROJECT_BY_SCHEDULE_HEALTH['behind-schedule'] ? PROJECT_BY_SCHEDULE_HEALTH['behind-schedule'] : '', |
|
|
|
|
PROJECT_BY_SCHEDULE_HEALTH && PROJECT_BY_SCHEDULE_HEALTH.warning ? PROJECT_BY_SCHEDULE_HEALTH.warning : '', |
|
|
|
|
PROJECT_BY_SCHEDULE_HEALTH && PROJECT_BY_SCHEDULE_HEALTH['on-schedule'] ? PROJECT_BY_SCHEDULE_HEALTH['on-schedule'] : '' |
|
|
|
|
], |
|
|
|
|
borderColor: ["#E80053", "#FFD600", "#52AC0B"], |
|
|
|
|
backgroundColor: ["#E80053", "#FFD600", "#52AC0B"], |
|
|
|
@ -571,8 +580,8 @@ const DashboardBOD = () => {
|
|
|
|
|
label: "", |
|
|
|
|
// data: [7, 2, 4, 3],
|
|
|
|
|
data: PROJECT_PER_DIVISION ? PROJECT_PER_DIVISION.map((item, idx) => item.total) : [], |
|
|
|
|
borderColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3"], |
|
|
|
|
backgroundColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3"], |
|
|
|
|
borderColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3", "#A36A16"], |
|
|
|
|
backgroundColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3", "#A36A16"], |
|
|
|
|
borderWidth: 2, |
|
|
|
|
borderSkipped: false |
|
|
|
|
}, |
|
|
|
@ -622,9 +631,9 @@ const DashboardBOD = () => {
|
|
|
|
|
{ |
|
|
|
|
label: "", |
|
|
|
|
// data: [50, 120, 72, 60],
|
|
|
|
|
data: PROJECT_VALUE_PER_DIVISION ? PROJECT_VALUE_PER_DIVISION.map((item, idx) => item.total) : [], |
|
|
|
|
borderColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3"], |
|
|
|
|
backgroundColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3"], |
|
|
|
|
data: PROJECT_VALUE_PER_DIVISION ? PROJECT_VALUE_PER_DIVISION.map((item, idx) => item.total).filter(value => value !== 0) : [], |
|
|
|
|
borderColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3", "#A36A16"], |
|
|
|
|
backgroundColor: ["#023E8A", "#C851B7", "#FD7034", "#3A0CA3", "#A36A16"], |
|
|
|
|
borderWidth: 2, |
|
|
|
|
borderSkipped: false |
|
|
|
|
}, |
|
|
|
|