@@ -94,23 +94,23 @@ class EchartsPage extends StatelessWidget {
94
94
onSelection: {
95
95
'groupMouse' : {
96
96
false : (gradient) => LinearGradient (
97
- begin: const Alignment (0 , 0 ),
98
- end: const Alignment (0 , 1 ),
99
- colors: [
100
- gradient.colors.first.withAlpha (25 ),
101
- gradient.colors.last.withAlpha (25 ),
102
- ],
103
- ),
97
+ begin: const Alignment (0 , 0 ),
98
+ end: const Alignment (0 , 1 ),
99
+ colors: [
100
+ gradient.colors.first.withAlpha (25 ),
101
+ gradient.colors.last.withAlpha (25 ),
102
+ ],
103
+ ),
104
104
},
105
105
'groupTouch' : {
106
106
false : (gradient) => LinearGradient (
107
- begin: const Alignment (0 , 0 ),
108
- end: const Alignment (0 , 1 ),
109
- colors: [
110
- gradient.colors.first.withAlpha (25 ),
111
- gradient.colors.last.withAlpha (25 ),
112
- ],
113
- ),
107
+ begin: const Alignment (0 , 0 ),
108
+ end: const Alignment (0 , 1 ),
109
+ colors: [
110
+ gradient.colors.first.withAlpha (25 ),
111
+ gradient.colors.last.withAlpha (25 ),
112
+ ],
113
+ ),
114
114
},
115
115
},
116
116
),
@@ -240,51 +240,63 @@ class EchartsPage extends StatelessWidget {
240
240
),
241
241
),
242
242
MarkAnnotation (
243
- relativePath: Paths .circle (center: Offset .zero, radius: 5 ),
243
+ relativePath:
244
+ Paths .circle (center: Offset .zero, radius: 5 ),
244
245
style: Paint ()..color = const Color (0xff5470c6 ),
245
246
values: ['Wed' , 13 ],
246
247
),
247
248
MarkAnnotation (
248
- relativePath: Paths .circle (center: Offset .zero, radius: 5 ),
249
+ relativePath:
250
+ Paths .circle (center: Offset .zero, radius: 5 ),
249
251
style: Paint ()..color = const Color (0xff5470c6 ),
250
252
values: ['Sun' , 9 ],
251
253
),
252
254
MarkAnnotation (
253
- relativePath: Paths .circle (center: Offset .zero, radius: 5 ),
255
+ relativePath:
256
+ Paths .circle (center: Offset .zero, radius: 5 ),
254
257
style: Paint ()..color = const Color (0xff91cc75 ),
255
258
values: ['Tue' , - 2 ],
256
259
),
257
260
MarkAnnotation (
258
- relativePath: Paths .circle (center: Offset .zero, radius: 5 ),
261
+ relativePath:
262
+ Paths .circle (center: Offset .zero, radius: 5 ),
259
263
style: Paint ()..color = const Color (0xff91cc75 ),
260
264
values: ['Thu' , 5 ],
261
265
),
262
266
TagAnnotation (
263
- label: Label ('13' , LabelStyle (
264
- Defaults .textStyle,
265
- offset: const Offset (0 , - 10 ),
266
- )),
267
+ label: Label (
268
+ '13' ,
269
+ LabelStyle (
270
+ Defaults .textStyle,
271
+ offset: const Offset (0 , - 10 ),
272
+ )),
267
273
values: ['Wed' , 13 ],
268
274
),
269
275
TagAnnotation (
270
- label: Label ('9' , LabelStyle (
271
- Defaults .textStyle,
272
- offset: const Offset (0 , - 10 ),
273
- )),
276
+ label: Label (
277
+ '9' ,
278
+ LabelStyle (
279
+ Defaults .textStyle,
280
+ offset: const Offset (0 , - 10 ),
281
+ )),
274
282
values: ['Sun' , 9 ],
275
283
),
276
284
TagAnnotation (
277
- label: Label ('-2' , LabelStyle (
278
- Defaults .textStyle,
279
- offset: const Offset (0 , - 10 ),
280
- )),
285
+ label: Label (
286
+ '-2' ,
287
+ LabelStyle (
288
+ Defaults .textStyle,
289
+ offset: const Offset (0 , - 10 ),
290
+ )),
281
291
values: ['Tue' , - 2 ],
282
292
),
283
293
TagAnnotation (
284
- label: Label ('5' , LabelStyle (
285
- Defaults .textStyle,
286
- offset: const Offset (0 , - 10 ),
287
- )),
294
+ label: Label (
295
+ '5' ,
296
+ LabelStyle (
297
+ Defaults .textStyle,
298
+ offset: const Offset (0 , - 10 ),
299
+ )),
288
300
values: ['Thu' , 5 ],
289
301
),
290
302
],
@@ -300,7 +312,7 @@ class EchartsPage extends StatelessWidget {
300
312
variables: {
301
313
'time' : Variable (
302
314
accessor: (List datum) => datum[0 ] as String ,
303
- scale: OrdinalScale (inflate: true ),
315
+ scale: OrdinalScale (inflate: true , maxTickCount : 6 ),
304
316
),
305
317
'value' : Variable (
306
318
accessor: (List datum) => datum[1 ] as num ,
@@ -311,9 +323,11 @@ class EchartsPage extends StatelessWidget {
311
323
),
312
324
),
313
325
},
314
- elements: [LineElement (
315
- shape: ShapeAttr (value: BasicLineShape (smooth: true )),
316
- )],
326
+ elements: [
327
+ LineElement (
328
+ shape: ShapeAttr (value: BasicLineShape (smooth: true )),
329
+ )
330
+ ],
317
331
axes: [
318
332
Defaults .horizontalAxis,
319
333
Defaults .verticalAxis,
@@ -357,4 +371,4 @@ class EchartsPage extends StatelessWidget {
357
371
),
358
372
);
359
373
}
360
- }
374
+ }
0 commit comments