Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 102b51bff6 | |||
| 13ab3af479 |
@@ -2,33 +2,28 @@
|
||||
|
||||
Swift package for displaying charts effortlessly.
|
||||
|
||||
**V2 Beta 1 is released, if you would like to try it out you can find a [demo project here](https://github.com/AppPear/ChartViewV2Demo)**
|
||||
|
||||
**iOS 14 WidgetKit support is coming. In V2 I will update current charts and possibly extend with some new chart types to provide the best support for building informative and beautiful widgets for the new home screen 🥳 Stay tuned!**
|
||||
|
||||

|
||||
|
||||
## V2 Beta is here 🎉🎉🎉
|
||||
|
||||
V2 focuses on providing a strong and easy to use base, on which you can build your beautiful custom charts. It provides basic building blocks, like a chart view (bar, pie, line and ring chart), grid view, card view, interactive label for displaying the curent chart value.
|
||||
So you decide, whether you build a fully fledged interactive view, or just display a bare bone chart
|
||||
|
||||
* [How to install SwiftUI ChartView](https://github.com/AppPear/ChartView/wiki/How-to-install-SwiftUI-ChartView)
|
||||
|
||||
* [How to create your first chart](https://github.com/AppPear/ChartView/wiki/How-to-create-your-first-chart)
|
||||
|
||||
### It supports interactions and animations
|
||||
<img src="https://user-images.githubusercontent.com/2826764/130787802-9aa619ee-05de-4343-ba3c-1796e4d05e08.gif" width="26%"></img> <img src="https://user-images.githubusercontent.com/2826764/130787814-283f3d26-6c9d-448b-b2c7-879e60a3b05d.gif" width="26%"></img>
|
||||
|
||||
### It is fully customizable, and works together with native SwiftUI elements well
|
||||
<img src="https://user-images.githubusercontent.com/2826764/130785262-010d6791-16cf-485d-b920-29e4086477e2.png" width="45%"></img> <img src="https://user-images.githubusercontent.com/2826764/130785266-94a08622-2963-4177-8777-8bd3ad463809.png" width="45%"></img> <img src="https://user-images.githubusercontent.com/2826764/130785268-284314de-ba96-4fb7-a1e5-8a46578e1f0e.png" width="45%"></img>
|
||||
|
||||
### Installation
|
||||
please check out `2.0.0-beta.2` tag
|
||||
|
||||

|
||||
## Original (stable) version:
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/2826764/131211993-5d33312b-09af-44b4-a32e-ffaad739adfe.gif" width="45%"></img> <img src="https://user-images.githubusercontent.com/2826764/131211994-48c9ce4e-2e67-40a0-b727-c88bdbd22cd0.gif" width="45%">
|
||||
|
||||
### Usage
|
||||
|
||||
|
||||
|
||||
|
||||
It supports:
|
||||
* Line charts
|
||||
* Bar charts
|
||||
@@ -59,7 +54,8 @@ Added an example project, with **iOS, watchOS** target: https://github.com/AppPe
|
||||
|
||||
**LineChartView with multiple lines!**
|
||||
First release of this feature, interaction is disabled for now, I'll figure it out how could be the best to interact with multiple lines with a single touch.
|
||||

|
||||
|
||||
<img src="https://user-images.githubusercontent.com/2826764/131211991-eca64276-cf05-423f-a78a-697c55e44bbc.gif" width="50%"></img>
|
||||
|
||||
Usage:
|
||||
```swift
|
||||
@@ -80,7 +76,6 @@ Available preset gradients:
|
||||
|
||||
**Full screen view called LineView!!!**
|
||||
|
||||

|
||||
|
||||
```swift
|
||||
LineView(data: [8,23,54,32,12,37,7,23,43], title: "Line chart", legend: "Full screen") // legend is optional, use optional .padding()
|
||||
@@ -88,7 +83,7 @@ Available preset gradients:
|
||||
|
||||
Adopts to dark mode automatically
|
||||
|
||||

|
||||
<img src="https://user-images.githubusercontent.com/2826764/131211977-27439357-491d-4872-a6bd-f696edac4c7f.gif" width="45%"></img> <img src="https://user-images.githubusercontent.com/2826764/131211985-f77464d6-7fd8-429d-9e77-9f9bc7424d32.gif" width="45%">
|
||||
|
||||
You can add your custom darkmode style by specifying:
|
||||
|
||||
@@ -110,7 +105,7 @@ You can add a line chart with the following code:
|
||||
|
||||
|
||||
## Bar charts
|
||||

|
||||
<img src="https://user-images.githubusercontent.com/2826764/131211994-48c9ce4e-2e67-40a0-b727-c88bdbd22cd0.gif" width="45%">
|
||||
|
||||
**[New feature] you can display labels also along values and points for each bar to descirbe your data better!**
|
||||
**Bar chart is interactive, so you can drag across to reveal the data points**
|
||||
@@ -188,10 +183,9 @@ You can access built-in styles:
|
||||
* barChartMidnightGreenLight
|
||||
* barChartMidnightGreenDark
|
||||
|
||||

|
||||
|
||||

|
||||
<img src="https://user-images.githubusercontent.com/2826764/131211990-e41cec90-38f4-4965-8bdc-41c30b79acea.gif" width="45%">
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/2826764/131211999-6ec4f13b-0465-4135-b576-76e31b11a2c6.png" width="45%">
|
||||
|
||||
### You can customize the size of the chart with a ChartForm object:
|
||||
|
||||
@@ -211,10 +205,10 @@ If you want to animate back movement after completing your gesture, you set `ani
|
||||
|
||||
### WatchOS support for Bar charts:
|
||||
|
||||

|
||||
<img src="https://user-images.githubusercontent.com/2826764/131212000-a058fdd9-af40-4e64-adc3-82201ea2484d.png" width="45%">
|
||||
|
||||
## Pie charts
|
||||

|
||||
<img src="https://user-images.githubusercontent.com/2826764/131211998-e142657d-0ebc-43b7-aeda-07cae4d9e34b.png" width="45%">
|
||||
|
||||
You can add a pie chart with the following code:
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 514 KiB |
|
Before Width: | Height: | Size: 502 KiB |
|
Before Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 343 KiB |
|
Before Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 73 KiB |