Skip to content

[FD-295] bar chart 용 core component 추가#87

Open
soyeonLee126 wants to merge 5 commits intomainfrom
feature/add-bar-chart-FD-295
Open

[FD-295] bar chart 용 core component 추가#87
soyeonLee126 wants to merge 5 commits intomainfrom
feature/add-bar-chart-FD-295

Conversation

@soyeonLee126
Copy link
Collaborator

변경 내용

  • Barchart 추가
  • 아래와 같이 필요한 text value / percentage / color / animation value 받아 사용
image
  • 사용 예제는 아래와 같음
            BarChartCard(
                title = "먹기 전에\n카메라부터 찾았네요.",
                descriptionPrefix = "지난 달 대비 기록된 사진이 ",
                highlightText = "70%",
                descriptionSuffix = " 증가했어요.",
                bars = listOf(
                    BarChartItem(
                        label = "1월",
                        percentage = (20f / 140f) * 100f,
                        valueText = "20",
                        topColor = Color(0xFF415199),
                        bottomColor = Color(0xFF8AA6E6),
                        animationDurationMillis = 520,
                    ),
                    BarChartItem(
                        label = "2월",
                        percentage = 100f,
                        valueText = "140",
                        topColor = Color(0xFFFE670E),
                        bottomColor = Color(0xFFFFB183),
                        animationDurationMillis = 680,
                    ),
                ).withStaggeredAnimation(delayStepMillis = 90),
                barSpacing = 60.dp,
                chartHeight = 182.dp,
                modifier = Modifier.fillMaxWidth(),
            )

체크리스트

  • 빌드 정상 동작
  • 불필요한 파일 없음

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant