forked from eatvio/eatvio_app
feat(diary): chart width
This commit is contained in:
@@ -263,7 +263,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
maximum: 100,
|
||||
showLabels: false,
|
||||
showTicks: false,
|
||||
radiusFactor: 0.8,
|
||||
radiusFactor: 0.7,
|
||||
axisLineStyle: AxisLineStyle(
|
||||
thickness: 0.1,
|
||||
color: Colors.grey[200],
|
||||
@@ -273,7 +273,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
// Carbohydrates Arc
|
||||
RangePointer(
|
||||
value: (chartData[0].intake / chartData[0].recommendation) * 100,
|
||||
width: 0.1,
|
||||
width: 0.16,
|
||||
color: chartData[0].color,
|
||||
sizeUnit: GaugeSizeUnit.factor,
|
||||
enableAnimation: true,
|
||||
@@ -282,46 +282,46 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
// Fats Arc
|
||||
RangePointer(
|
||||
value: (chartData[1].intake / chartData[1].recommendation) * 100,
|
||||
width: 0.1,
|
||||
width: 0.16,
|
||||
color: chartData[1].color,
|
||||
sizeUnit: GaugeSizeUnit.factor,
|
||||
enableAnimation: true,
|
||||
cornerStyle: CornerStyle.bothCurve,
|
||||
pointerOffset: -0.12,
|
||||
pointerOffset: -0.18,
|
||||
),
|
||||
// Proteins Arc
|
||||
RangePointer(
|
||||
value: (chartData[2].intake / chartData[2].recommendation) * 100,
|
||||
width: 0.1,
|
||||
width: 0.16,
|
||||
color: chartData[2].color,
|
||||
sizeUnit: GaugeSizeUnit.factor,
|
||||
enableAnimation: true,
|
||||
cornerStyle: CornerStyle.bothCurve,
|
||||
pointerOffset: -0.24,
|
||||
pointerOffset: -0.36,
|
||||
),
|
||||
// Calories Arc
|
||||
RangePointer(
|
||||
value: (chartData[3].intake / chartData[3].recommendation) * 100,
|
||||
width: 0.1,
|
||||
width: 0.16,
|
||||
color: chartData[3].color,
|
||||
sizeUnit: GaugeSizeUnit.factor,
|
||||
enableAnimation: true,
|
||||
cornerStyle: CornerStyle.bothCurve,
|
||||
pointerOffset: -0.36,
|
||||
pointerOffset: -0.54,
|
||||
),
|
||||
],
|
||||
annotations: <GaugeAnnotation>[
|
||||
// Label for Carbohydrates
|
||||
GaugeAnnotation(
|
||||
widget: Transform.rotate(
|
||||
angle: 30,
|
||||
angle: 30.1,
|
||||
child: Text(
|
||||
'Углеводы',
|
||||
style: TextStyle(color: Colors.white, fontSize: 12),
|
||||
),
|
||||
),
|
||||
angle: 194,
|
||||
positionFactor: 1,
|
||||
angle: 198,
|
||||
positionFactor: 0.92,
|
||||
),
|
||||
// Label for Fats
|
||||
GaugeAnnotation(
|
||||
@@ -333,7 +333,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
),
|
||||
),
|
||||
angle: 190,
|
||||
positionFactor: 1.07,
|
||||
positionFactor: 1.1,
|
||||
),
|
||||
// Label for Proteins
|
||||
GaugeAnnotation(
|
||||
@@ -345,7 +345,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
),
|
||||
),
|
||||
angle: 190,
|
||||
positionFactor: 1.19,
|
||||
positionFactor: 1.27,
|
||||
),
|
||||
// Label for Calories
|
||||
GaugeAnnotation(
|
||||
@@ -357,7 +357,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
),
|
||||
),
|
||||
angle: 192,
|
||||
positionFactor: 1.31,
|
||||
positionFactor: 1.46,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user