Fix/cumulative cash collected - Thousands calculation corrected (#274)

* TP-26207| Cumulative cash collection graph fix

* TP-26207| shortNumbers function called in yAxis calculation

* TP-26207| Thousands correction in shortNumbernotation

Co-authored-by: Herik Modi <modi.herik@gmail.com>
This commit is contained in:
Herik Hiteshkumar Modi
2023-04-21 15:55:18 +05:30
committed by GitHub Enterprise
parent 62d55bd45f
commit 4dcf25f006
2 changed files with 122 additions and 122 deletions

View File

@@ -4,213 +4,213 @@
"data": [ "data": [
{ {
"xaxis": "2023-03-23", "xaxis": "2023-03-23",
"cashCollectedInLast30Days": "1012475.76", "cashCollectedInLast30Days": "123620.27",
"level": "L5", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "985851.25",
"lowerLevelCashCollectedInLast30Days": "1247503.27" "lowerLevelCashCollectedInLast30Days": "883308.28"
}, },
{ {
"xaxis": "2023-03-24", "xaxis": "2023-03-24",
"cashCollectedInLast30Days": "1009866.33", "cashCollectedInLast30Days": "101819.03",
"level": "L5", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "985883.41",
"lowerLevelCashCollectedInLast30Days": "1241432.92" "lowerLevelCashCollectedInLast30Days": "891356.07"
}, },
{ {
"xaxis": "2023-03-25", "xaxis": "2023-03-25",
"cashCollectedInLast30Days": "1027504.69", "cashCollectedInLast30Days": "98718.95",
"level": "L5", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "981623.46",
"lowerLevelCashCollectedInLast30Days": "1209899.47" "lowerLevelCashCollectedInLast30Days": "882617.79"
}, },
{ {
"xaxis": "2023-03-26", "xaxis": "2023-03-26",
"cashCollectedInLast30Days": "1014751.2", "cashCollectedInLast30Days": "87813.32",
"level": "L5", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "960919.54",
"lowerLevelCashCollectedInLast30Days": "1188489.84" "lowerLevelCashCollectedInLast30Days": "853613.68"
}, },
{ {
"xaxis": "2023-03-27", "xaxis": "2023-03-27",
"cashCollectedInLast30Days": "990451.06", "cashCollectedInLast30Days": "80354.44",
"level": "L5", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "956440.84",
"lowerLevelCashCollectedInLast30Days": "1191034.33" "lowerLevelCashCollectedInLast30Days": "865756.13"
}, },
{ {
"xaxis": "2023-03-28", "xaxis": "2023-03-28",
"cashCollectedInLast30Days": "1005788.45", "cashCollectedInLast30Days": "71316.4",
"level": "L5", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "989778.75",
"lowerLevelCashCollectedInLast30Days": "1209263.55" "lowerLevelCashCollectedInLast30Days": "882379.77"
}, },
{ {
"xaxis": "2023-03-29", "xaxis": "2023-03-29",
"cashCollectedInLast30Days": "1211468.83", "cashCollectedInLast30Days": "57881.16",
"level": "L6", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "992439.48",
"lowerLevelCashCollectedInLast30Days": "1215114.7" "lowerLevelCashCollectedInLast30Days": "886390.03"
}, },
{ {
"xaxis": "2023-03-30", "xaxis": "2023-03-30",
"cashCollectedInLast30Days": "1223278.62", "cashCollectedInLast30Days": "9834.04",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "961203.07",
"lowerLevelCashCollectedInLast30Days": "1208218.09" "lowerLevelCashCollectedInLast30Days": "875369.34"
}, },
{ {
"xaxis": "2023-03-31", "xaxis": "2023-03-31",
"cashCollectedInLast30Days": "1338495.19", "cashCollectedInLast30Days": "9834.04",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "940802.81",
"lowerLevelCashCollectedInLast30Days": "1202495.31" "lowerLevelCashCollectedInLast30Days": "862449.53"
}, },
{ {
"xaxis": "2023-04-01", "xaxis": "2023-04-01",
"cashCollectedInLast30Days": "1328472.95", "cashCollectedInLast30Days": "3675.0",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "942112.34",
"lowerLevelCashCollectedInLast30Days": "1162373.96" "lowerLevelCashCollectedInLast30Days": "861923.17"
}, },
{ {
"xaxis": "2023-04-02", "xaxis": "2023-04-02",
"cashCollectedInLast30Days": "1308382.23", "cashCollectedInLast30Days": "38969.0",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "934765.9",
"lowerLevelCashCollectedInLast30Days": "1164292.5" "lowerLevelCashCollectedInLast30Days": "856968.95"
}, },
{ {
"xaxis": "2023-04-03", "xaxis": "2023-04-03",
"cashCollectedInLast30Days": "1348306.78", "cashCollectedInLast30Days": "89945.16",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "943412.83",
"lowerLevelCashCollectedInLast30Days": "1182718.55" "lowerLevelCashCollectedInLast30Days": "858613.64"
}, },
{ {
"xaxis": "2023-04-04", "xaxis": "2023-04-04",
"cashCollectedInLast30Days": "1399926.03", "cashCollectedInLast30Days": "218170.42",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "966327.26",
"lowerLevelCashCollectedInLast30Days": "1212524.99" "lowerLevelCashCollectedInLast30Days": "864114.91"
}, },
{ {
"xaxis": "2023-04-05", "xaxis": "2023-04-05",
"cashCollectedInLast30Days": "1424995.52", "cashCollectedInLast30Days": "270617.42",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "973412.75",
"lowerLevelCashCollectedInLast30Days": "1216199.32" "lowerLevelCashCollectedInLast30Days": "868370.5"
}, },
{ {
"xaxis": "2023-04-06", "xaxis": "2023-04-06",
"cashCollectedInLast30Days": "1512967.58", "cashCollectedInLast30Days": "431596.36",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "985551.02",
"lowerLevelCashCollectedInLast30Days": "1222987.97" "lowerLevelCashCollectedInLast30Days": "875334.87"
}, },
{ {
"xaxis": "2023-04-07", "xaxis": "2023-04-07",
"cashCollectedInLast30Days": "1568943.68", "cashCollectedInLast30Days": "534989.34",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "981524.72",
"lowerLevelCashCollectedInLast30Days": "1240081.31" "lowerLevelCashCollectedInLast30Days": "891057.85"
}, },
{ {
"xaxis": "2023-04-08", "xaxis": "2023-04-08",
"cashCollectedInLast30Days": "1537666.81", "cashCollectedInLast30Days": "617963.34",
"level": "L7", "level": "L1",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "977746.87",
"lowerLevelCashCollectedInLast30Days": "1211216.44" "lowerLevelCashCollectedInLast30Days": "889637.99"
}, },
{ {
"xaxis": "2023-04-09", "xaxis": "2023-04-09",
"cashCollectedInLast30Days": "1439701.67", "cashCollectedInLast30Days": "646485.85",
"level": "L7", "level": "L2",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "961850.48",
"lowerLevelCashCollectedInLast30Days": "1173985.26" "lowerLevelCashCollectedInLast30Days": "875963.83"
}, },
{ {
"xaxis": "2023-04-10", "xaxis": "2023-04-10",
"cashCollectedInLast30Days": "1882932.27", "cashCollectedInLast30Days": "698125.65",
"level": "L7", "level": "L2",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "967411.25",
"lowerLevelCashCollectedInLast30Days": "1167079.14" "lowerLevelCashCollectedInLast30Days": "889496.46"
}, },
{ {
"xaxis": "2023-04-11", "xaxis": "2023-04-11",
"cashCollectedInLast30Days": "1944062.01", "cashCollectedInLast30Days": "759710.0",
"level": "L7", "level": "L2",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "992329.24",
"lowerLevelCashCollectedInLast30Days": "1200013.5" "lowerLevelCashCollectedInLast30Days": "909335.71"
}, },
{ {
"xaxis": "2023-04-12", "xaxis": "2023-04-12",
"cashCollectedInLast30Days": "1936137.13", "cashCollectedInLast30Days": "778856.0",
"level": "L7", "level": "L2",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "1013526.67",
"lowerLevelCashCollectedInLast30Days": "1210408.52" "lowerLevelCashCollectedInLast30Days": "931562.83"
}, },
{ {
"xaxis": "2023-04-13", "xaxis": "2023-04-13",
"cashCollectedInLast30Days": "1903525.35", "cashCollectedInLast30Days": "803488.68",
"level": "L7", "level": "L2",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "998501.13",
"lowerLevelCashCollectedInLast30Days": "1214125.49" "lowerLevelCashCollectedInLast30Days": "920676.49"
}, },
{ {
"xaxis": "2023-04-14", "xaxis": "2023-04-14",
"cashCollectedInLast30Days": "1882037.28", "cashCollectedInLast30Days": "857282.67",
"level": "L7", "level": "L3",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "995087.24",
"lowerLevelCashCollectedInLast30Days": "1206540.66" "lowerLevelCashCollectedInLast30Days": "933386.49"
}, },
{ {
"xaxis": "2023-04-15", "xaxis": "2023-04-15",
"cashCollectedInLast30Days": "1885096.65", "cashCollectedInLast30Days": "882720.39",
"level": "L7", "level": "L3",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "1012053.37",
"lowerLevelCashCollectedInLast30Days": "1234671.52" "lowerLevelCashCollectedInLast30Days": "944810.09"
}, },
{ {
"xaxis": "2023-04-16", "xaxis": "2023-04-16",
"cashCollectedInLast30Days": "1885684.68", "cashCollectedInLast30Days": "890530.39",
"level": "L7", "level": "L3",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "994614.39",
"lowerLevelCashCollectedInLast30Days": "1202778.29" "lowerLevelCashCollectedInLast30Days": "933364.81"
}, },
{ {
"xaxis": "2023-04-17", "xaxis": "2023-04-17",
"cashCollectedInLast30Days": "1880230.74", "cashCollectedInLast30Days": "898969.39",
"level": "L7", "level": "L3",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "1005355.12",
"lowerLevelCashCollectedInLast30Days": "1205769.74" "lowerLevelCashCollectedInLast30Days": "923738.52"
}, },
{ {
"xaxis": "2023-04-18", "xaxis": "2023-04-18",
"cashCollectedInLast30Days": "1894007.74", "cashCollectedInLast30Days": "917033.36",
"level": "L7", "level": "L3",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "1028651.16",
"lowerLevelCashCollectedInLast30Days": "1257805.34" "lowerLevelCashCollectedInLast30Days": "962001.96"
}, },
{ {
"xaxis": "2023-04-19", "xaxis": "2023-04-19",
"cashCollectedInLast30Days": "1895017.35", "cashCollectedInLast30Days": "921033.36",
"level": "L7", "level": "L3",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "1034278.46",
"lowerLevelCashCollectedInLast30Days": "1261057.76" "lowerLevelCashCollectedInLast30Days": "951883.68"
}, },
{ {
"xaxis": "2023-04-20", "xaxis": "2023-04-20",
"cashCollectedInLast30Days": "1885353.35", "cashCollectedInLast30Days": "942373.98",
"level": "L7", "level": "L3",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "1030660.79",
"lowerLevelCashCollectedInLast30Days": "1259049.2" "lowerLevelCashCollectedInLast30Days": "955525.74"
}, },
{ {
"xaxis": "2023-04-21", "xaxis": "2023-04-21",
"cashCollectedInLast30Days": "1881713.35", "cashCollectedInLast30Days": "962607.98",
"level": "L7", "level": "L4",
"upperLevelCashCollectedInLast30Days": null, "upperLevelCashCollectedInLast30Days": "1044862.28",
"lowerLevelCashCollectedInLast30Days": "1259315.91" "lowerLevelCashCollectedInLast30Days": "957488.3"
} }
], ],
"xaxisDomainValues": [ "xaxisDomainValues": [

View File

@@ -27,8 +27,8 @@ export const shortNumberNotation = (value: any = 0, decimals = 2, separator = ''
return (parsedValue / 1e7).toFixed(decimals) + `${separator}Cr`; return (parsedValue / 1e7).toFixed(decimals) + `${separator}Cr`;
} else if (parsedValue >= 1e5) { } else if (parsedValue >= 1e5) {
return (parsedValue / 1e5).toFixed(decimals) + `${separator}L`; return (parsedValue / 1e5).toFixed(decimals) + `${separator}L`;
} else if (parsedValue >= 1e4) { } else if (parsedValue >= 1e3) {
return (parsedValue / 1e4).toFixed(decimals) + `${separator}K`; return (parsedValue / 1e3).toFixed(decimals) + `${separator}K`;
} }
return parsedValue; return parsedValue;
}; };