Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@

## [Unreleased]

## [1.3.2] - 2026-07-15

### Changed
- 샘플 앱을 차트 팔레트 기반 반응형 갤러리와 시나리오 선택형 상세 화면으로 개편 — 한 번에 하나의 예제만 렌더링하고 시스템 영역, 뒤로가기 접근성, 상태 복원을 개선

### Fixed
- Line/Bar/Donut/Pie/Radar 차트에 빈 `colors` 팔레트를 전달하면 발생하던 인덱싱 크래시를 기본 팔레트 fallback으로 방지

### Documentation
- README와 내부 contributor 문서를 v1.3.1 릴리스 기준으로 정리 — 최신 dependency/version 표기, 성능 릴리스 설명, 릴리즈 문서 동기화 체크리스트 보강
- README `GridStyle.dashPattern` 예제를 현재 `List<Float>` API에 맞게 수정하고 mirrored example test 추가
- 실제 Compose 렌더링으로 생성한 라이트·다크 차트 이미지 12장과 재현 가능한 opt-in 캡처 스크립트 추가

## [1.3.1] - 2026-06-11

Expand Down
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ Jetpack Compose에서 사용할 수 있는 가볍고 독립적인 차트 UI 컴
<td align="center"><b>Donut Chart</b></td>
</tr>
<tr>
<td><img src="screenshots/Line%20Chart.png" width="280"/></td>
<td><img src="screenshots/Bar%20Chart.png" width="280"/></td>
<td><img src="screenshots/Donut%20Chart.png" width="280"/></td>
<td><img src="screenshots/line-chart-light.png" alt="라이트 모드 선 차트" width="280"/></td>
<td><img src="screenshots/bar-chart-light.png" alt="라이트 모드 막대 차트" width="280"/></td>
<td><img src="screenshots/donut-chart-light.png" alt="라이트 모드 도넛 차트" width="280"/></td>
</tr>
<tr>
<td align="center"><b>Gauge Chart</b></td>
<td align="center"><b>Radar Chart</b></td>
<td align="center"><b>Pie Chart</b></td>
</tr>
<tr>
<td><img src="screenshots/Gauge%20Chart.png" width="280"/></td>
<td><img src="screenshots/Radar%20Chart.png" width="280"/></td>
<td><img src="screenshots/Pie%20Chart.png" width="280"/></td>
<td><img src="screenshots/gauge-chart-light.png" alt="라이트 모드 게이지 차트" width="280"/></td>
<td><img src="screenshots/radar-chart-light.png" alt="라이트 모드 레이더 차트" width="280"/></td>
<td><img src="screenshots/pie-chart-light.png" alt="라이트 모드 파이 차트" width="280"/></td>
</tr>
</table>

Expand All @@ -39,7 +39,18 @@ Jetpack Compose에서 사용할 수 있는 가볍고 독립적인 차트 UI 컴
레이더 웹 색상이 다크 모드에 자동 대응합니다. 다크 모드 전용 스타일 설정은
필요하지 않습니다.

> 📷 다크 모드 스크린샷 추가 예정: `screenshots/{chart}-dark.png`
<table>
<tr>
<td><img src="screenshots/line-chart-dark.png" alt="다크 모드 선 차트" width="280"/></td>
<td><img src="screenshots/bar-chart-dark.png" alt="다크 모드 막대 차트" width="280"/></td>
<td><img src="screenshots/donut-chart-dark.png" alt="다크 모드 도넛 차트" width="280"/></td>
</tr>
<tr>
<td><img src="screenshots/gauge-chart-dark.png" alt="다크 모드 게이지 차트" width="280"/></td>
<td><img src="screenshots/radar-chart-dark.png" alt="다크 모드 레이더 차트" width="280"/></td>
<td><img src="screenshots/pie-chart-dark.png" alt="다크 모드 파이 차트" width="280"/></td>
</tr>
</table>

## Why?

Expand All @@ -55,20 +66,20 @@ Jetpack Compose에서 사용할 수 있는 가볍고 독립적인 차트 UI 컴

## Setup

현재 문서 기준 최신 릴리스는 **v1.3.1**입니다.
현재 문서 기준 최신 릴리스는 **v1.3.2**입니다.

```kotlin
// build.gradle.kts
dependencies {
implementation("io.github.ois0886:compose-chart:1.3.1")
implementation("io.github.ois0886:compose-chart:1.3.2")
}
```

## Quick Start

### 선 차트

<img src="screenshots/Line%20Chart.png" width="400"/>
<img src="screenshots/line-chart-light.png" alt="라이트 모드 선 차트" width="400"/>

```kotlin
LineChart(
Expand All @@ -82,7 +93,7 @@ LineChart(

### 막대 차트

<img src="screenshots/Bar%20Chart.png" width="400"/>
<img src="screenshots/bar-chart-light.png" alt="라이트 모드 막대 차트" width="400"/>

```kotlin
BarChart(
Expand All @@ -96,7 +107,7 @@ BarChart(

### 도넛 차트

<img src="screenshots/Donut%20Chart.png" width="300"/>
<img src="screenshots/donut-chart-light.png" alt="라이트 모드 도넛 차트" width="300"/>

```kotlin
DonutChart(
Expand All @@ -113,7 +124,7 @@ DonutChart(

### 게이지 차트

<img src="screenshots/Gauge%20Chart.png" width="300"/>
<img src="screenshots/gauge-chart-light.png" alt="라이트 모드 게이지 차트" width="300"/>

```kotlin
GaugeChart(
Expand All @@ -124,7 +135,7 @@ GaugeChart(

### 레이더 차트

<img src="screenshots/Radar%20Chart.png" width="300"/>
<img src="screenshots/radar-chart-light.png" alt="라이트 모드 레이더 차트" width="300"/>

```kotlin
RadarChart(
Expand All @@ -138,7 +149,7 @@ RadarChart(

### 파이 차트

<img src="screenshots/Pie%20Chart.png" width="300"/>
<img src="screenshots/pie-chart-light.png" alt="라이트 모드 파이 차트" width="300"/>

```kotlin
PieChart(
Expand All @@ -147,10 +158,10 @@ PieChart(
)
```

## Features (v1.3.1)
## Features (v1.3.2)

README 예제 코드는 테스트에서도 함께 유지되어, 문서 스니펫이 실제 API와 어긋나지 않도록 관리합니다.
v1.3.1은 공개 API와 시각 결과를 유지하면서 Line/Bar/Donut/Pie/Radar 렌더링 hot path의 반복 계산과 할당을 줄인 성능 개선 릴리스입니다.
v1.3.2는 공개 API 시그니처를 유지하면서 빈 색상 팔레트를 안전한 기본 팔레트로 대체하고, 샘플 앱과 라이트·다크 차트 갤러리를 새로 정리한 패치 릴리스입니다.

### 줌 & 팬

Expand Down Expand Up @@ -273,6 +284,7 @@ LineChart(

기본 팔레트(`ChartDefaults.colors`)는 6개 색으로 구성되며, 멀티 시리즈 차트에서
순서대로 배정되고 시리즈 수가 6개를 넘으면 처음부터 다시 순환합니다.
`colors = emptyList()`를 전달해도 크래시하지 않고 이 기본 팔레트로 대체됩니다.

| # | Name | HEX |
|---|--------|-----------|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package com.inseong.composechart

import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performScrollToNode
import com.inseong.composechart.ui.theme.ComposeChartTheme
import org.junit.Rule
import org.junit.Test
Expand Down Expand Up @@ -32,6 +35,9 @@ class ChartGalleryScreenTest {
composeTestRule.waitForIdle()

ChartType.entries.forEach { chartType ->
composeTestRule
.onNodeWithTag("chart-gallery-grid")
.performScrollToNode(hasText(chartType.displayName))
composeTestRule.onNodeWithText(chartType.displayName).assertIsDisplayed()
}
}
Expand All @@ -44,6 +50,6 @@ class ChartGalleryScreenTest {
}
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Compose Chart Gallery").assertIsDisplayed()
composeTestRule.onNodeWithText("COMPOSE CHART").assertIsDisplayed()
}
}
47 changes: 26 additions & 21 deletions app/src/androidTest/java/com/inseong/composechart/NavigationTest.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package com.inseong.composechart

import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performScrollToNode
import com.inseong.composechart.ui.theme.ComposeChartTheme
import org.junit.Rule
import org.junit.Test
Expand All @@ -19,9 +23,8 @@ class NavigationTest {
ComposeChartTheme { ChartApp() }
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Line Chart").performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Normal").assertIsDisplayed()
openChart(ChartType.LINE)
composeTestRule.onNodeWithText("Default").assertIsDisplayed()
}

@Test
Expand All @@ -30,9 +33,8 @@ class NavigationTest {
ComposeChartTheme { ChartApp() }
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Bar Chart").performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Normal").assertIsDisplayed()
openChart(ChartType.BAR)
composeTestRule.onNodeWithText("Default").assertIsDisplayed()
}

@Test
Expand All @@ -41,9 +43,8 @@ class NavigationTest {
ComposeChartTheme { ChartApp() }
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Donut Chart").performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Normal").assertIsDisplayed()
openChart(ChartType.DONUT)
composeTestRule.onNodeWithText("Default").assertIsDisplayed()
}

@Test
Expand All @@ -52,9 +53,8 @@ class NavigationTest {
ComposeChartTheme { ChartApp() }
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Gauge Chart").performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Normal").assertIsDisplayed()
openChart(ChartType.GAUGE)
composeTestRule.onNodeWithText("Default").assertIsDisplayed()
}

@Test
Expand All @@ -63,9 +63,8 @@ class NavigationTest {
ComposeChartTheme { ChartApp() }
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Radar Chart").performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Normal").assertIsDisplayed()
openChart(ChartType.RADAR)
composeTestRule.onNodeWithText("Default").assertIsDisplayed()
}

@Test
Expand All @@ -74,9 +73,8 @@ class NavigationTest {
ComposeChartTheme { ChartApp() }
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Pie Chart").performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Normal").assertIsDisplayed()
openChart(ChartType.PIE)
composeTestRule.onNodeWithText("Default").assertIsDisplayed()
}

@Test
Expand All @@ -85,10 +83,17 @@ class NavigationTest {
ComposeChartTheme { ChartApp() }
}
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Line Chart").performClick()
openChart(ChartType.LINE)
composeTestRule.onNodeWithContentDescription("Back to chart gallery").performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("\u2190").performClick()
composeTestRule.onNodeWithText("COMPOSE CHART").assertIsDisplayed()
}

private fun openChart(chartType: ChartType) {
composeTestRule
.onNodeWithTag("chart-gallery-grid")
.performScrollToNode(hasText(chartType.displayName))
composeTestRule.onNodeWithText(chartType.displayName).performClick()
composeTestRule.waitForIdle()
composeTestRule.onNodeWithText("Compose Chart Gallery").assertIsDisplayed()
}
}
Loading