AAY-chart 1.2.0 indexed Contains chart composables for line, bar, pie, donut, and radar charts, customizable with various parameters and styles, designed for seamless integration in projects involving data visualization.
Bring this to kpkg
This library is indexed from the KMP ecosystem and already resolves through kpkg.dev's Maven Central proxy. Maintainers can verify the namespace and publish future versions to kpkg for free hosting, real download stats, and signed-provenance pages.
Publishing coming soonMetadata
Owner TheChance101
Stars 682
Used by —
Health —
License MIT License
Latest 1.2.0
Repository github.com/TheChance101/AAY-chart
Updated 2026-02-22 Readme Changelog
AAY-chart
The library contains several chart composables for usage in Kotlin Multiplatform projects and Android Native .
Currently supported platforms are Desktop Android IOS and Web
How to use?
Add dependency in your module build.gradle
dependencies {
implementation("io.github.thechance101:chart:$latest_release " )
}
Examples
Show Line Chart in Jetpack Compose:
Show Bar Chart in Jetpack Compose:
Show Pie Chart in Jetpack Compose:
{
testPieChartData: List<PieChartData> = listOf(
PieChartData(
partName = ,
= ,
color = Color( ),
),
PieChartData(
partName = ,
= ,
color = Color( ),
),
PieChartData(
partName = ,
= ,
color = Color( ),
),
PieChartData(
partName = ,
= ,
color = Color( ),
),
)
PieChart(
modifier = Modifier.fillMaxSize(),
pieChartData = testPieChartData,
ratioLineColor = Color.LightGray,
textRatioStyle = TextStyle(color = Color.Gray),
)
}
Show Donut Chart in Jetpack Compose:
Show Radar Chart in Jetpack Compose:
Contributors
Contributing
Contributions are welcome! Please read our CONTRIBUTING.md for more information on how to get started.
CI/CD
We use GitHub Actions for our CI/CD. All Pull Requests are automatically tested, and releases are published to Maven Central.
MIT License
@Composable
fun LineChartSample () {
val testLineParameters: List<LineParameters> = listOf(
LineParameters(
label = "revenue" ,
data = listOf(70.0 , 00.0 , 50.33 , 40.0 , 100.500 , 50.0 ),
lineColor = Color.Gray,
lineType = LineType.CURVED_LINE,
lineShadow = true ,
),
LineParameters(
label = "Earnings" ,
data = listOf(60.0 , 80.6 , 40.33 , 86.232 , 88.0 , 90.0 ),
lineColor = Color(0xFFFF7F50 ),
lineType = LineType.DEFAULT_LINE,
lineShadow = true
),
LineParameters(
label = "Earnings" ,
data = listOf(1.0 , 40.0 , 11.33 , 55.23 , 1.0 , 100.0 ),
lineColor = Color(0xFF81BE88 ),
lineType = LineType.CURVED_LINE,
lineShadow = false ,
)
)
Box(Modifier) {
LineChart(
modifier = Modifier.fillMaxSize(),
linesParameters = testLineParameters,
isGrid = true ,
gridColor = Color.Blue,
xAxisData = listOf("2015" , "2016" , "2017" , "2018" , "2019" , "2020" ),
animateChart = true ,
showGridWithSpacer = true ,
yAxisStyle = TextStyle(
fontSize = 14. sp,
color = Color.Gray,
),
xAxisStyle = TextStyle(
fontSize = 14. sp,
color = Color.Gray,
fontWeight = FontWeight.W400
),
yAxisRange = 14 ,
oneLineChart = false ,
gridOrientation = GridOrientation.VERTICAL
)
}
}
@Composable
fun BarChartSample () {
val testBarParameters: List<BarParameters> = listOf(
BarParameters(
dataName = "Completed" ,
data = listOf(0.6 , 10.6 , 80.0 , 50.6 , 44.0 , 100.6 , 10.0 ),
barColor = Color(0xFF6C3428 )
),
BarParameters(
dataName = "Completed" ,
data = listOf(50.0 , 30.6 , 77.0 , 69.6 , 50.0 , 30.6 , 80.0 ),
barColor = Color(0xFFBA704F ),
),
BarParameters(
dataName = "Completed" ,
data = listOf(100.0 , 99.6 , 60.0 , 80.6 , 10.0 , 100.6 , 55.99 ),
barColor = Color(0xFFDFA878 ),
),
)
Box(Modifier.fillMaxSize()) {
BarChart(
chartParameters = testBarParameters,
gridColor = Color.DarkGray,
xAxisData = listOf("2016" , "2017" , "2018" , "2019" , "2020" , "2021" , "2022" ),
isShowGrid = true ,
animateChart = true ,
showGridWithSpacer = true ,
yAxisStyle = TextStyle(
fontSize = 14. sp,
color = Color.DarkGray,
),
xAxisStyle = TextStyle(
fontSize = 14. sp,
color = Color.DarkGray,
fontWeight = FontWeight.W400
),
yAxisRange = 15 ,
barWidth = 20. dp
)
}
}
@Composable
fun PieChartSample ()
val
"part A"
data
500.0
0xFF22A699
"Part B"
data
700.0
0xFFF2BE22
"Part C"
data
500.0
0xFFF29727
"Part D"
data
100.0
0xFFF24C3D
@Composable
fun DonutChartSample () {
val testPieChartData: List<PieChartData> = listOf(
PieChartData(
partName = "part A" ,
data = 500.0 ,
color = Color(0xFF0B666A ),
),
PieChartData(
partName = "Part B" ,
data = 700.0 ,
color = Color(0xFF35A29F ),
),
PieChartData(
partName = "Part C" ,
data = 500.0 ,
color = Color(0xFF97FEED ),
),
PieChartData(
partName = "Part D" ,
data = 100.0 ,
color = Color(0xFF071952 ),
),
)
DonutChart(
modifier = Modifier.fillMaxSize(),
pieChartData = testPieChartData,
centerTitle = "Orders" ,
centerTitleStyle = TextStyle(color = Color(0xFF071952 )),
outerCircularColor = Color.LightGray,
innerCircularColor = Color.Gray,
ratioLineColor = Color.LightGray,
)
}
@Composable
fun RadarChartSample () {
val radarLabels =
listOf(
"Party A" ,
"Party A" ,
"Party A" ,
"Part A" ,
"Party A" ,
"Party A" ,
"Party A" ,
"Party A" ,
"Party A"
)
val values2 = listOf(120.0 , 160.0 , 110.0 , 112.0 , 200.0 , 120.0 , 145.0 , 101.0 , 200.0 )
val values = listOf(180.0 , 180.0 , 165.0 , 135.0 , 120.0 , 150.0 , 140.0 , 190.0 , 200.0 )
val labelsStyle = TextStyle(
color = Color.Black,
fontFamily = FontFamily.Serif,
fontWeight = FontWeight.Medium,
fontSize = 10. sp
)
val scalarValuesStyle = TextStyle(
color = Color.Black,
fontFamily = FontFamily.Serif,
fontWeight = FontWeight.Medium,
fontSize = 10. sp
)
RadarChart(
modifier = Modifier.fillMaxSize(),
radarLabels = radarLabels,
labelsStyle = labelsStyle,
netLinesStyle = NetLinesStyle(
netLineColor = Color(0x90ffD3CFD3 ),
netLinesStrokeWidth = 2f ,
netLinesStrokeCap = StrokeCap.Butt
),
scalarSteps = 2 ,
scalarValue = 200.0 ,
scalarValuesStyle = scalarValuesStyle,
polygons = listOf(
Polygon(
values = values,
unit = "$" ,
style = PolygonStyle(
fillColor = Color(0xffc2ff86 ),
fillColorAlpha = 0.5f ,
borderColor = Color(0xffe6ffd6 ),
borderColorAlpha = 0.5f ,
borderStrokeWidth = 2f ,
borderStrokeCap = StrokeCap.Butt,
)
),
Polygon(
values = values2,
unit = "$" ,
style = PolygonStyle(
fillColor = Color(0xffFFDBDE ),
fillColorAlpha = 0.5f ,
borderColor = Color(0xffFF8B99 ),
borderColorAlpha = 0.5f ,
borderStrokeWidth = 2f ,
borderStrokeCap = StrokeCap.Butt
)
)
)
)
}
Copyright (c) 2023 The Chance
permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy , modify, merge , publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM ,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Related libraries Surfaced from shared tags and platforms — no rankings paid for.
compose-shimmer ★ 1.0k
valentinilk Offers shimmering animation for UI elements, integrated via a simple modifier. Includes customization options like theming and animation boundaries. Supports advanced usage scenarios and custom modifiers. Shared: desktop, compose material3-windowsizeclass-multiplatform ★ 361
chrisbanes Facilitates responsive UI design by implementing Material 3 window size classes across multiple platforms, ensuring layouts adapt to various screen sizes. Supports Android, iOS, desktop, and web environments. Shared: desktop, compose compose-sonner ★ 349
dokar3 An opinionated toast component, replicates the features of a popular React library. Offers stacked, animated, and customizable toasts with support for various themes, positions, durations, and interactions. Shared: desktop, compose MediaPlayer-KMP ★ 302
KhubaibKhan4 Enables seamless YouTube video and audio playback across multiple platforms, integrating with JetBrains Compose Multiplatform. Features include authentication tokens, event handling, and reels view support. Shared: desktop, compose Odyssey ★ 255
AlexGladkov Declarative navigation library supporting simple and nested navigation, parameters, bottom and tab navigation, side drawers, state saving, and transition animations, with back press handling. Shared: desktop, compose krop ★ 178
tamimattafi Facilitates image cropping with support for shapes, aspect ratios, transformations, and large images. Offers out-of-the-box or custom UI options and easy integration with image sources. Shared: desktop, compose