mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-10-29 17:32:20 +00:00
[WIFI-12226] Interface stats Y-axis now only 2 decimals or less
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.9.0(3)",
|
||||
"version": "2.9.0(4)",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ucentral-client",
|
||||
"version": "2.9.0(3)",
|
||||
"version": "2.9.0(4)",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@chakra-ui/icons": "^2.0.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.9.0(3)",
|
||||
"version": "2.9.0(4)",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"main": "index.tsx",
|
||||
|
||||
@@ -45,21 +45,21 @@ const InterfaceChart = ({ data }: Props) => {
|
||||
const points = {
|
||||
labels: data.recorded.map((recorded) => new Date(recorded * 1000).toLocaleTimeString()),
|
||||
datasets: [
|
||||
{
|
||||
// Real 'Tx', but shown as 'Rx'
|
||||
label: 'Tx',
|
||||
data: data.rx.map((tx) => Math.floor((tx / factor) * 100) / 100),
|
||||
borderColor: colorMode === 'light' ? '#63B3ED' : '#BEE3F8', // blue-300 - blue-100
|
||||
backgroundColor: colorMode === 'light' ? '#63B3ED' : '#BEE3F8', // blue-300 - blue-100
|
||||
},
|
||||
{
|
||||
// Real 'Rx', but shown as 'Tx'
|
||||
label: 'Rx',
|
||||
data: data.tx.map((rx) => Math.floor((rx / factor) * 100) / 100),
|
||||
borderColor: colorMode === 'light' ? '#48BB78' : '#9AE6B4', // green-400 - green-200
|
||||
backgroundColor: colorMode === 'light' ? '#48BB78' : '#9AE6B4', // green-400 - green-200
|
||||
},
|
||||
],
|
||||
{
|
||||
// Real 'Tx', but shown as 'Rx'
|
||||
label: 'Tx',
|
||||
data: data.rx.map((tx) => (Math.floor((tx / factor) * 100) / 100).toFixed(2)),
|
||||
borderColor: colorMode === 'light' ? '#63B3ED' : '#BEE3F8', // blue-300 - blue-100
|
||||
backgroundColor: colorMode === 'light' ? '#63B3ED' : '#BEE3F8', // blue-300 - blue-100
|
||||
},
|
||||
{
|
||||
// Real 'Rx', but shown as 'Tx'
|
||||
label: 'Rx',
|
||||
data: data.tx.map((rx) => (Math.floor((rx / factor) * 100) / 100).toFixed(2)),
|
||||
borderColor: colorMode === 'light' ? '#48BB78' : '#9AE6B4', // green-400 - green-200
|
||||
backgroundColor: colorMode === 'light' ? '#48BB78' : '#9AE6B4', // green-400 - green-200
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user