Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
tbcare
tbcare-web
Commits
e1438349
Commit
e1438349
authored
Mar 15, 2021
by
Zafir Rasyidi Taufik
Browse files
[REFACTOR]Remove unused functions and fix chart location slightly
parent
6466306c
Pipeline
#63899
failed with stages
in 4 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/scenes/Home/components/Statistic/index.tsx
View file @
e1438349
...
...
@@ -31,14 +31,11 @@ function Statistic({
minAge
:
0
,
maxAge
:
0
,
});
const
[
activeIndex
,
setActiveIndex
]
=
useState
<
number
[]
>
([]);
const
[
activeIndex
,
setActiveIndex
]
=
useState
<
number
[]
>
([
0
,
1
,
2
]);
const
[
selectedKeyData
,
setselectedKeyData
]
=
useState
<
any
[]
>
([{}]);
// const onPieEnter = (_pData: any, index: number) => {
// setActiveIndex(index);
// };
const
filterExports
=
async
(
filterType
:
StatisticType
)
=>
{
const
response
=
await
services
.
main
.
filterExportCSV
(
...
...
@@ -129,25 +126,15 @@ function Statistic({
setPagedData
(
tableData
.
slice
(
0
,
10
));
},
[
tableData
]);
const
getActiveIndices
=
()
=>
{
let
res
:
Array
<
number
>
=
[]
for
(
let
index
=
0
;
index
<
3
;
index
++
)
{
if
(
selectedKeyData
[
index
].
jumlah
>
0
)
{
res
.
push
(
index
);
}
}
return
res
;
};
const
renderChart
=
()
=>
{
if
(
chartType
)
{
return
(
<
PieChart
width
=
{
425
}
height
=
{
265
}
>
<
Pie
activeIndex
=
{
[
0
,
1
,
2
]
}
activeIndex
=
{
activeIndex
}
activeShape
=
{
renderActiveShape
}
data
=
{
selectedKeyData
}
cx
=
{
2
0
0
}
cx
=
{
2
1
0
}
cy
=
{
120
}
innerRadius
=
{
60
}
outerRadius
=
{
80
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment