Skip to content

Commit cbe0682

Browse files
committed
v0.4.0
1 parent ecec6e5 commit cbe0682

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2079
-3493
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.4.0
2+
3+
**2021-10-26**
4+
5+
- A complete refactoring.
6+
- Better declaration grammer.
7+
- Dataflow.
8+
- Interactive.
9+
- Documentation.
10+
111
## 0.3.0
212

313
**2020-12-04**

DEVLOG.md

+78
Original file line numberDiff line numberDiff line change
@@ -3670,6 +3670,84 @@ tooltip render 中引进 selector 和 scaleconv的目的是要variable和 title
36703670

36713671

36723672

3673+
interval in rect coord
3674+
3675+
bar with tooltip
3676+
3677+
transposed
3678+
3679+
dodge
3680+
3681+
stack
3682+
3683+
有标签的漏斗
3684+
3685+
3686+
3687+
interval in polar
3688+
3689+
donat
3690+
3691+
radius rose
3692+
3693+
stack rose
3694+
3695+
race
3696+
3697+
3698+
3699+
line and area
3700+
3701+
smooth line and area with nan
3702+
3703+
river
3704+
3705+
spider net
3706+
3707+
3708+
3709+
point
3710+
3711+
various shape point,coord can move, region annot, trigger tooltip
3712+
3713+
axis in center
3714+
3715+
polar coord, with a danger tag
3716+
3717+
1d coordinate value.
3718+
3719+
3720+
3721+
polygon
3722+
3723+
heatmap
3724+
3725+
corner radius heatmap
3726+
3727+
polar heatmap
3728+
3729+
sector polygon
3730+
3731+
3732+
3733+
custom
3734+
3735+
candle stick
3736+
3737+
custom triangle
3738+
3739+
custom tooltip
3740+
3741+
3742+
3743+
bigdata
3744+
3745+
3746+
3747+
避免label-text的设置过长,将核心参数设为位置参数,将lebel syle设为可选位置参数
3748+
3749+
3750+
36733751
## TODO
36743752

36753753
group selection

README.md

+26-37
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,40 @@
1-
**Graphic is now under a total refactoring. The prior available version code is here: [v0.3.0](https://github.com/entronad/graphic/tree/v0.3.0) .**
1+
![examples](https://github.com/entronad/graphic/raw/main/devdoc/examples.jpg)
22

3-
![examples](./devdoc/examples.jpg)
3+
# [Graphic](https://pub.dev/packages/graphic)
44

5+
Graphic is a declarative, interactive grammar of data visualization. It provides a Flutter charting library.
56

7+
- **A Grammar of Graphics**: Graphic derives from Leland Wilkinson's book *The Grammar of Graphics*, and tries to balance between theoretical beauty and practicability. It inherits most concepts, like the graphic algebra.
8+
- **Declarative and Reactive**: As is encouraged in Flutter, the chart widget of Graphic is declarative and reactive. The grammar of data visualization is implemented by a declarative specification and the chart will reevaluate automatically on widget update.
9+
- **Interactive**: With the *signal* and *selection* mechanism, the chart is highly interactive. It is easy to pop a tooltip or scale the coordinate.
10+
- **Customizable**: With the *shape* and *figure* classes, it's easy to custom your own element, tooltip, annotation, etc.
11+
- **Dataflow Graph and Operators**: Graphic has a internal structure of a dataflow graph and operators. That is how the reactive reevaluation and interaction is implemented.
612

7-
*A Flutter data visualization library based on Grammar of Graphics.*
13+
## Installation
814

15+
Install from the [pub.dev](https://pub.dev/packages/graphic/install).
916

17+
## Documentation
1018

11-
# Usage
19+
See in the [documentation](https://pub.dev/documentation/graphic/latest/graphic/graphic-library.html) written in dart-doc.
1220

13-
**Installing**
21+
## Examples
1422

15-
[pub.dev](https://pub.dev/packages/graphic/install)
23+
Example of charts can be seen in the [Example App](https://github.com/entronad/graphic/tree/main/example).
1624

17-
**Basic example**
25+
## Reference
1826

19-
```dart
20-
graphic.Chart(
21-
data: [
22-
{ 'genre': 'Sports', 'sold': 275 },
23-
{ 'genre': 'Strategy', 'sold': 115 },
24-
{ 'genre': 'Action', 'sold': 120 },
25-
{ 'genre': 'Shooter', 'sold': 350 },
26-
{ 'genre': 'Other', 'sold': 150 },
27-
],
28-
scales: {
29-
'genre': graphic.CatScale(
30-
accessor: (map) => map['genre'] as String,
31-
),
32-
'sold': graphic.LinearScale(
33-
accessor: (map) => map['sold'] as num,
34-
nice: true,
35-
)
36-
},
37-
geoms: [graphic.IntervalGeom(
38-
position: graphic.PositionAttr(field: 'genre*sold'),
39-
)],
40-
axes: {
41-
'genre': graphic.Defaults.horizontalAxis,
42-
'sold': graphic.Defaults.verticalAxis,
43-
},
44-
)
45-
```
27+
Besides *The Grammar of Graphics*, the API terminology also referes to [AntV](https://antv.vision/en) and [Vega](https://vega.github.io/). The dataflow structure is inspired by [Vega](https://vega.github.io/).
4628

47-
**Document**
29+
## License
4830

49-
If you have ever used data visualization libs based on Grammar of Graphics, such as [AntV](https://antv.vision/en) , [ggplot2](https://ggplot2.tidyverse.org/), you can be quite familiar with these concepts.
31+
Graphic is [MIT License](https://github.com/entronad/graphic/blob/main/LICENSE).
32+
33+
## Keep Informed
34+
35+
[Twitter](https://twitter.com/entronad_viz)
36+
37+
[Medium](https://medium.com/@entronad)
38+
39+
[Zhihu](https://www.zhihu.com/people/entronad)
5040

51-
The document has not been written yet, but by referring to the [Example App](https://github.com/entronad/graphic/tree/master/example) , I believe you can be smart enough to build your charts :)

0 commit comments

Comments
 (0)