You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-3
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ YCharts is a light and extensible chart library for Jetpack Compose system. It c
7
7
8
8
## Adding YCharts to your project:
9
9
10
-
You can add automatically the library via Maven:
10
+
You can add the library via Maven:
11
11
12
12
Gradle:
13
13
```groovy
14
-
implementation 'co.yml:ycharts:1.0.0'
14
+
implementation 'co.yml:ycharts:2.0.0'
15
15
```
16
16
17
17
## Modules
@@ -43,13 +43,15 @@ Let's see how we can use the chart components and style them with available cust
43
43
```
44
44
val xAxisData = AxisData.Builder()
45
45
.axisStepSize(100.dp)
46
+
.backgroundColor(Color.Blue)
46
47
.steps(pointsData.size - 1)
47
48
.labelData { i -> i.toString() }
48
49
.labelAndAxisLinePadding(15.dp)
49
50
.build()
50
51
51
52
val yAxisData = AxisData.Builder()
52
53
.steps(steps)
54
+
.backgroundColor(Color.Red)
53
55
.labelAndAxisLinePadding(20.dp)
54
56
.labelData { i ->
55
57
val yScale = 100 / steps
@@ -73,7 +75,8 @@ Let's see how we can use the chart components and style them with available cust
73
75
),
74
76
xAxisData = xAxisData,
75
77
yAxisData = yAxisData,
76
-
gridLines = GridLines()
78
+
gridLines = GridLines(),
79
+
backgroundColor = Color.White
77
80
)
78
81
```
79
82
* Finally use the _**`LineChart`**_ Component to render the line chart with the above input
@@ -349,6 +352,17 @@ Let's see how we can use the chart components and style them with available cust
349
352
To interact with your device with touch and spoken feedback, you can turn on the TalkBack screen reader. TalkBack describes the graphs/charts when tapped on the graph container.
350
353
Compose views by deafult supports accessibility services, but for views drawn using canvas has no straight forward approach as of now, hence all our graph components supports an accessibility popup out of the box that will be shown over the graph with tapped on the container, with all the values described in an order to support accessibility services. User will be able to scroll the popup and find all the points, bars, slices or combined values in a descriptive manner, where user can tap and talkback would read it out loud.
351
354
355
+
## KMM Support.
356
+
* For the ongoing effort to provide multiplatform solution, Ycharts now being written in Compose Multiplatform, adopting KMM has been a game-changer, we hope to achieve good results in this effort with community contribution.
357
+
Currently KMM compatible code can be found at _**`kmm-main`**_ branch
358
+
359
+
360
+
## Changes in version 2.0
361
+
* Fix for multiple line graph/chart has been added, now it can be used to plot multiple line graphs/line charts on a single canvas or a single line with multiple colors.
362
+
* Background color for Pie chart/Donut chart now can be set via _**`backgroundColor`**_ parameter through PieChartConfig model, this is done to keep the behaviour consistent with current syntax pattern.
363
+
* Kotlin-library updates: _**`Kotlin version`**_ has been upgraded to '1.8.10' along with agp, compose-compiler, core-ktx, target sdk, and other compatible library updates.
364
+
* Sample App has been updated to showcase more use-cases for each chart type.
0 commit comments