11 | extends Controller
{
12 | double rotationAngle;
13 | double rawRotationAngle;
14 | bool rotateEnabled;
15 | double minOffset;
16 |
17 | PieRadarController(
18 | {this.rotationAngle = 270,
19 | this.rawRotationAngle = 270,
20 | this.rotateEnabled = true,
21 | this.minOffset = 30,
22 | IMarker marker,
23 | Description description,
24 | OnChartValueSelectedListener selectionListener,
25 | double maxHighlightDistance = 100.0,
26 | bool highLightPerTapEnabled = true,
27 | double extraTopOffset = 0.0,
28 | double extraRightOffset = 0.0,
29 | double extraBottomOffset = 0.0,
30 | double extraLeftOffset = 0.0,
31 | bool drawMarkers = true,
32 | bool resolveGestureHorizontalConflict = false,
33 | bool resolveGestureVerticalConflict = false,
34 | double descTextSize = 12,
35 | double infoTextSize = 12,
36 | Color descTextColor,
37 | Color infoTextColor,
38 | Color infoBgColor,
39 | String noDataText = "No chart data available.",
40 | XAxisSettingFunction xAxisSettingFunction,
41 | LegendSettingFunction legendSettingFunction,
42 | DataRendererSettingFunction rendererSettingFunction})
43 | : super(
44 | marker: marker,
45 | noDataText: noDataText,
46 | xAxisSettingFunction: xAxisSettingFunction,
47 | legendSettingFunction: legendSettingFunction,
48 | rendererSettingFunction: rendererSettingFunction,
49 | description: description,
50 | selectionListener: selectionListener,
51 | maxHighlightDistance: maxHighlightDistance,
52 | highLightPerTapEnabled: highLightPerTapEnabled,
53 | extraTopOffset: extraTopOffset,
54 | extraRightOffset: extraRightOffset,
55 | extraBottomOffset: extraBottomOffset,
56 | extraLeftOffset: extraLeftOffset,
57 | drawMarkers: drawMarkers,
58 | resolveGestureHorizontalConflict: resolveGestureHorizontalConflict,
59 | resolveGestureVerticalConflict: resolveGestureVerticalConflict,
60 | descTextSize: descTextSize,
61 | infoTextSize: infoTextSize,
62 | descTextColor: descTextColor,
63 | infoBgColor: infoBgColor,
64 | infoTextColor: infoTextColor);
65 |
66 | @override
67 | void onRotateUpdate(double angle) {
68 | rawRotationAngle = angle;
69 | rotationAngle = Utils.getNormalizedAngle(rawRotationAngle);
70 | state.setStateIfNotDispose();
71 | }
72 |
73 | P get painter => super.painter;
74 | }
75 |
--------------------------------------------------------------------------------
/mp_chart/lib/mp/core/adapter_android_mp.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:path_drawing/path_drawing.dart';
4 |
5 | class DashPathEffect {
6 | CircularIntervalList