Skip to content

Commit

Permalink
v0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
entronad committed Dec 1, 2021
1 parent a52806a commit 120a612
Show file tree
Hide file tree
Showing 26 changed files with 871 additions and 283 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.5.1

**2021-12-01**

- Tooltip constraints.
- Now selections triggerd with same gesture is allowd.
- Device settings of selection.
- Now all z indexes are static, thus no need to resort scenes.
- Some updates above are inspired by https://github.com/entronad/graphic/issues/27.

## 0.5.0

**2021-11-18**
Expand Down
18 changes: 17 additions & 1 deletion DEVLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3864,9 +3864,25 @@ time就不要引入 intl库支持mask了吧,那样要引入额外的规则和

所有spec中函数类型的property,还是都按名词命名吧,因为用户关注的它是什么(出自 Effectiv Dart)

selection 同时唯一性:

现在的逻辑是这样的:同时只有一个 gesture -> 现在规定一个gesture只能定义一个selection -> 所以自然产生对于同一个element同时只会发生一个selection

但是对于同一个element同时只会发生一个selection应当是一个额外的规定,同一个gesture应该可以定义多个 selection,同一时刻产生多个selects(用map存储),而在update中判断onSelection不能定义有同时发生的selection

对应 element update,最重要的目的是,同一时间只能有一个selection起效,当只触发一个selection时,OK,当触发多个selection时,必须确保只有其中的一个在defined names中

selection定义中添加一个仅在某些设备上运行的开关(signal中可在实际Gesture signal detail中判断设备)

tooltip添加一个自动往里挤的功能,可开关

现在新的selector渲染机制也不需要动态zIndex了,决定把改机制去了,zIndex都是静态的。

默认值应当尽量在parse中设置,而不在op中处理

## TODO

整合errorlog,需处理:throw, assert, list.single
整合errorlog,需处理:throw, assert, list.single,singleIntersection

group selection

Expand Down
91 changes: 91 additions & 0 deletions example/lib/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,97 @@ const basicData = [
{'genre': 'Other', 'sold': 150},
];

const complexGroupData = [
{'date': '2021-10-01', 'name': 'Liam', 'points': 1468},
{'date': '2021-10-01', 'name': 'Oliver', 'points': 1487},
{'date': '2021-10-01', 'name': 'Elijah', 'points': 1494},
{'date': '2021-10-02', 'name': 'Liam', 'points': 1526},
{'date': '2021-10-02', 'name': 'Noah', 'points': 1492},
{'date': '2021-10-02', 'name': 'Oliver', 'points': 1470},
{'date': '2021-10-02', 'name': 'Elijah', 'points': 1477},
{'date': '2021-10-03', 'name': 'Liam', 'points': 1466},
{'date': '2021-10-03', 'name': 'Noah', 'points': 1465},
{'date': '2021-10-03', 'name': 'Oliver', 'points': 1524},
{'date': '2021-10-03', 'name': 'Elijah', 'points': 1534},
{'date': '2021-10-04', 'name': 'Noah', 'points': 1504},
{'date': '2021-10-04', 'name': 'Elijah', 'points': 1524},
{'date': '2021-10-05', 'name': 'Oliver', 'points': 1534},
{'date': '2021-10-06', 'name': 'Noah', 'points': 1463},
{'date': '2021-10-07', 'name': 'Liam', 'points': 1502},
{'date': '2021-10-07', 'name': 'Noah', 'points': 1539},
{'date': '2021-10-08', 'name': 'Liam', 'points': 1476},
{'date': '2021-10-08', 'name': 'Noah', 'points': 1483},
{'date': '2021-10-08', 'name': 'Oliver', 'points': 1534},
{'date': '2021-10-08', 'name': 'Elijah', 'points': 1530},
{'date': '2021-10-09', 'name': 'Noah', 'points': 1519},
{'date': '2021-10-09', 'name': 'Oliver', 'points': 1497},
{'date': '2021-10-09', 'name': 'Elijah', 'points': 1460},
{'date': '2021-10-10', 'name': 'Liam', 'points': 1514},
{'date': '2021-10-10', 'name': 'Noah', 'points': 1518},
{'date': '2021-10-10', 'name': 'Oliver', 'points': 1470},
{'date': '2021-10-10', 'name': 'Elijah', 'points': 1526},
{'date': '2021-10-11', 'name': 'Liam', 'points': 1517},
{'date': '2021-10-11', 'name': 'Noah', 'points': 1478},
{'date': '2021-10-11', 'name': 'Oliver', 'points': 1468},
{'date': '2021-10-11', 'name': 'Elijah', 'points': 1487},
{'date': '2021-10-12', 'name': 'Liam', 'points': 1535},
{'date': '2021-10-12', 'name': 'Noah', 'points': 1537},
{'date': '2021-10-12', 'name': 'Oliver', 'points': 1463},
{'date': '2021-10-12', 'name': 'Elijah', 'points': 1478},
{'date': '2021-10-13', 'name': 'Oliver', 'points': 1524},
{'date': '2021-10-13', 'name': 'Elijah', 'points': 1496},
{'date': '2021-10-14', 'name': 'Liam', 'points': 1527},
{'date': '2021-10-14', 'name': 'Oliver', 'points': 1527},
{'date': '2021-10-14', 'name': 'Elijah', 'points': 1462},
{'date': '2021-10-15', 'name': 'Liam', 'points': 1532},
{'date': '2021-10-15', 'name': 'Noah', 'points': 1509},
{'date': '2021-10-15', 'name': 'Oliver', 'points': 1540},
{'date': '2021-10-15', 'name': 'Elijah', 'points': 1536},
{'date': '2021-10-16', 'name': 'Liam', 'points': 1480},
{'date': '2021-10-16', 'name': 'Elijah', 'points': 1533},
{'date': '2021-10-17', 'name': 'Noah', 'points': 1515},
{'date': '2021-10-17', 'name': 'Oliver', 'points': 1518},
{'date': '2021-10-17', 'name': 'Elijah', 'points': 1515},
{'date': '2021-10-18', 'name': 'Oliver', 'points': 1489},
{'date': '2021-10-18', 'name': 'Elijah', 'points': 1518},
{'date': '2021-10-19', 'name': 'Oliver', 'points': 1472},
{'date': '2021-10-19', 'name': 'Elijah', 'points': 1473},
{'date': '2021-10-20', 'name': 'Liam', 'points': 1513},
{'date': '2021-10-20', 'name': 'Noah', 'points': 1533},
{'date': '2021-10-20', 'name': 'Oliver', 'points': 1487},
{'date': '2021-10-20', 'name': 'Elijah', 'points': 1532},
{'date': '2021-10-21', 'name': 'Liam', 'points': 1497},
{'date': '2021-10-21', 'name': 'Noah', 'points': 1477},
{'date': '2021-10-21', 'name': 'Oliver', 'points': 1516},
{'date': '2021-10-22', 'name': 'Liam', 'points': 1466},
{'date': '2021-10-22', 'name': 'Noah', 'points': 1476},
{'date': '2021-10-22', 'name': 'Oliver', 'points': 1536},
{'date': '2021-10-22', 'name': 'Elijah', 'points': 1483},
{'date': '2021-10-23', 'name': 'Liam', 'points': 1503},
{'date': '2021-10-23', 'name': 'Oliver', 'points': 1521},
{'date': '2021-10-23', 'name': 'Elijah', 'points': 1529},
{'date': '2021-10-24', 'name': 'Liam', 'points': 1460},
{'date': '2021-10-24', 'name': 'Noah', 'points': 1532},
{'date': '2021-10-24', 'name': 'Oliver', 'points': 1477},
{'date': '2021-10-24', 'name': 'Elijah', 'points': 1470},
{'date': '2021-10-25', 'name': 'Noah', 'points': 1504},
{'date': '2021-10-25', 'name': 'Oliver', 'points': 1494},
{'date': '2021-10-25', 'name': 'Elijah', 'points': 1528},
{'date': '2021-10-26', 'name': 'Liam', 'points': 1517},
{'date': '2021-10-26', 'name': 'Noah', 'points': 1503},
{'date': '2021-10-26', 'name': 'Elijah', 'points': 1507},
{'date': '2021-10-27', 'name': 'Liam', 'points': 1538},
{'date': '2021-10-27', 'name': 'Noah', 'points': 1530},
{'date': '2021-10-27', 'name': 'Oliver', 'points': 1496},
{'date': '2021-10-27', 'name': 'Elijah', 'points': 1519},
{'date': '2021-10-28', 'name': 'Liam', 'points': 1511},
{'date': '2021-10-28', 'name': 'Oliver', 'points': 1500},
{'date': '2021-10-28', 'name': 'Elijah', 'points': 1519},
{'date': '2021-10-29', 'name': 'Noah', 'points': 1499},
{'date': '2021-10-29', 'name': 'Oliver', 'points': 1489},
{'date': '2021-10-30', 'name': 'Noah', 'points': 1460}
];

class TimeSeriesSales {
final DateTime time;
final int sales;
Expand Down
2 changes: 2 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'pages/point.dart';
import 'pages/polygon.dart';
import 'pages/custom.dart';
import 'pages/bigdata.dart';
// import 'pages/debug.dart';

final routes = {
'/': (context) => const HomePage(),
Expand All @@ -18,6 +19,7 @@ final routes = {
'/examples/Polygon Element': (context) => PolygonPage(),
'/examples/Custom': (context) => CustomPage(),
'/examples/Bigdata': (context) => BigdataPage(),
// '/examples/Debug': (context) => DebugPage(),
};

class MyApp extends StatelessWidget {
Expand Down
38 changes: 27 additions & 11 deletions example/lib/pages/custom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ class CustomPage extends StatelessWidget {
},
elements: [
IntervalElement(
position: Varset('index') * Varset('value') / Varset('type'),
position:
Varset('index') * Varset('value') / Varset('type'),
color: ColorAttr(
variable: 'type', values: Defaults.colors10),
size: SizeAttr(value: 2),
Expand All @@ -339,62 +340,77 @@ class CustomPage extends StatelessWidget {
crosshair: CrosshairGuide(),
annotations: [
MarkAnnotation(
relativePath: Path()..addRect(Rect.fromCircle(center: const Offset(0, 0), radius: 5)),
relativePath: Path()
..addRect(Rect.fromCircle(
center: const Offset(0, 0), radius: 5)),
style: Paint()..color = Defaults.colors10[0],
anchor: (size) => const Offset(25, 290),
),
TagAnnotation(
label: Label(
'Email',
LabelStyle(Defaults.textStyle, align: Alignment.centerRight),
LabelStyle(Defaults.textStyle,
align: Alignment.centerRight),
),
anchor: (size) => const Offset(34, 290),
),
MarkAnnotation(
relativePath: Path()..addRect(Rect.fromCircle(center: const Offset(0, 0), radius: 5)),
relativePath: Path()
..addRect(Rect.fromCircle(
center: const Offset(0, 0), radius: 5)),
style: Paint()..color = Defaults.colors10[1],
anchor: (size) => Offset(25 + size.width / 5, 290),
),
TagAnnotation(
label: Label(
'Affiliate',
LabelStyle(Defaults.textStyle, align: Alignment.centerRight),
LabelStyle(Defaults.textStyle,
align: Alignment.centerRight),
),
anchor: (size) => Offset(34 + size.width / 5, 290),
),
MarkAnnotation(
relativePath: Path()..addRect(Rect.fromCircle(center: const Offset(0, 0), radius: 5)),
relativePath: Path()
..addRect(Rect.fromCircle(
center: const Offset(0, 0), radius: 5)),
style: Paint()..color = Defaults.colors10[2],
anchor: (size) => Offset(25 + size.width / 5 * 2, 290),
),
TagAnnotation(
label: Label(
'Video',
LabelStyle(Defaults.textStyle, align: Alignment.centerRight),
LabelStyle(Defaults.textStyle,
align: Alignment.centerRight),
),
anchor: (size) => Offset(34 + size.width / 5 * 2, 290),
),
MarkAnnotation(
relativePath: Path()..addRect(Rect.fromCircle(center: const Offset(0, 0), radius: 5)),
relativePath: Path()
..addRect(Rect.fromCircle(
center: const Offset(0, 0), radius: 5)),
style: Paint()..color = Defaults.colors10[3],
anchor: (size) => Offset(25 + size.width / 5 * 3, 290),
),
TagAnnotation(
label: Label(
'Direct',
LabelStyle(Defaults.textStyle, align: Alignment.centerRight),
LabelStyle(Defaults.textStyle,
align: Alignment.centerRight),
),
anchor: (size) => Offset(34 + size.width / 5 * 3, 290),
),
MarkAnnotation(
relativePath: Path()..addRect(Rect.fromCircle(center: const Offset(0, 0), radius: 5)),
relativePath: Path()
..addRect(Rect.fromCircle(
center: const Offset(0, 0), radius: 5)),
style: Paint()..color = Defaults.colors10[4],
anchor: (size) => Offset(25 + size.width / 5 * 4, 290),
),
TagAnnotation(
label: Label(
'Search',
LabelStyle(Defaults.textStyle, align: Alignment.centerRight),
LabelStyle(Defaults.textStyle,
align: Alignment.centerRight),
),
anchor: (size) => Offset(34 + size.width / 5 * 4, 290),
),
Expand Down
Loading

0 comments on commit 120a612

Please sign in to comment.