Commit 952206f7 authored by Administrator's avatar Administrator

reduce stroke width

parent b098b650
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"macos":[{"name":"package_info","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/stefan/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.1+5/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-08-03 16:00:04.331133","version":"1.17.5"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"macos":[{"name":"package_info","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.1+5/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-08-06 09:25:52.738268","version":"1.17.3"}
\ No newline at end of file
......@@ -79,8 +79,11 @@ class _AthleteTimeSeriesChartState extends State<AthleteTimeSeriesChart> {
return Column(
children: <Widget>[
Container(
height: 300,
AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: TimeSeriesChart(
data,
animate: true,
......
......@@ -4,6 +4,7 @@ import 'package:encrateia/models/heart_rate_zone.dart';
import 'package:encrateia/models/lap.dart';
import 'package:encrateia/models/power_zone.dart';
import 'package:encrateia/utils/graph_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:charts_common/common.dart' as common show Series, ChartBehavior;
......@@ -24,6 +25,7 @@ class MyLineChart extends LineChart {
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
domainAxis: NumericAxisSpec(
viewport: NumericExtents(0, maxDomain + 500),
......
......@@ -6,6 +6,7 @@ import 'package:encrateia/models/record_list.dart';
import 'package:encrateia/utils/image_utils.dart';
import 'package:encrateia/utils/my_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:encrateia/models/activity.dart';
import 'package:encrateia/models/event.dart';
import 'package:encrateia/utils/num_utils.dart';
......@@ -65,7 +66,8 @@ class _ActivityPowerWidgetState extends State<ActivityPowerWidget> {
athlete: widget.athlete,
),
),
Row(children: <Widget>[
if (kDebugMode)
Row(children: <Widget>[
const Spacer(),
MyButton.save(
child: Text(screenShotButtonText),
......
......@@ -29,7 +29,7 @@ class ActivityAltitudeChart extends StatelessWidget {
);
final List<Series<DoublePlotPoint, int>> data =
<Series<DoublePlotPoint, int>>[
<Series<DoublePlotPoint, int>>[
Series<DoublePlotPoint, int>(
id: 'Altitude',
colorFn: (_, __) => Color.black,
......@@ -44,8 +44,11 @@ class ActivityAltitudeChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......@@ -56,7 +59,7 @@ class ActivityAltitudeChart extends StatelessWidget {
dataIsInWholeNumbers: true,
desiredTickCount: 5),
domainTickProviderSpec:
const BasicNumericTickProviderSpec(desiredTickCount: 6),
const BasicNumericTickProviderSpec(desiredTickCount: 6),
),
);
} else
......
......@@ -48,8 +48,11 @@ class ActivityEcorChart extends StatelessWidget {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -47,8 +47,11 @@ class ActivityFormPowerChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -32,7 +32,8 @@ class ActivityGroundTimeChart extends StatelessWidget {
amount: athlete.recordAggregationCount,
);
final List<Series<DoublePlotPoint, int>> data = <Series<DoublePlotPoint, int>>[
final List<Series<DoublePlotPoint, int>> data =
<Series<DoublePlotPoint, int>>[
Series<DoublePlotPoint, int>(
id: 'Ground Time',
colorFn: (_, __) => Color.black,
......@@ -47,8 +48,11 @@ class ActivityGroundTimeChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -46,8 +46,11 @@ class ActivityHeartRateChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -79,8 +79,11 @@ class _ActivityIntervalsChartState extends State<ActivityIntervalsChart> {
return SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
height: 300,
AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
......
......@@ -44,8 +44,11 @@ class ActivityLegSpringStiffnessChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -32,7 +32,8 @@ class ActivityPaceChart extends StatelessWidget {
amount: athlete.recordAggregationCount,
);
final List<Series<DoublePlotPoint, int>> data = <Series<DoublePlotPoint, int>>[
final List<Series<DoublePlotPoint, int>> data =
<Series<DoublePlotPoint, int>>[
Series<DoublePlotPoint, int>(
id: 'Pace',
colorFn: (_, __) => Color.black,
......@@ -47,8 +48,11 @@ class ActivityPaceChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......@@ -59,7 +63,7 @@ class ActivityPaceChart extends StatelessWidget {
dataIsInWholeNumbers: false,
desiredTickCount: 5),
domainTickProviderSpec:
const BasicNumericTickProviderSpec(desiredTickCount: 6),
const BasicNumericTickProviderSpec(desiredTickCount: 6),
minimum: minimum,
maximum: maximum,
),
......
......@@ -47,8 +47,11 @@ class ActivityPowerChart extends StatelessWidget {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......@@ -56,8 +59,7 @@ class ActivityPowerChart extends StatelessWidget {
powerZones: powerZones,
domainTitle: 'Power (W)',
measureTickProviderSpec: const BasicNumericTickProviderSpec(
zeroBound: false,
desiredTickCount: 6),
zeroBound: false, desiredTickCount: 6),
domainTickProviderSpec:
const BasicNumericTickProviderSpec(desiredTickCount: 6),
),
......
......@@ -44,8 +44,11 @@ class ActivityPowerPerHeartRateChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -44,8 +44,11 @@ class ActivityPowerRatioChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -32,7 +32,8 @@ class ActivitySpeedChart extends StatelessWidget {
amount: athlete.recordAggregationCount,
);
final List<Series<DoublePlotPoint, int>> data = <Series<DoublePlotPoint, int>>[
final List<Series<DoublePlotPoint, int>> data =
<Series<DoublePlotPoint, int>>[
Series<DoublePlotPoint, int>(
id: 'Speed',
colorFn: (_, __) => Color.black,
......@@ -47,8 +48,11 @@ class ActivitySpeedChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......@@ -59,7 +63,7 @@ class ActivitySpeedChart extends StatelessWidget {
dataIsInWholeNumbers: false,
desiredTickCount: 5),
domainTickProviderSpec:
const BasicNumericTickProviderSpec(desiredTickCount: 6),
const BasicNumericTickProviderSpec(desiredTickCount: 6),
minimum: minimum,
maximum: maximum,
),
......
......@@ -28,7 +28,8 @@ class ActivitySpeedPerHeartRateChart extends StatelessWidget {
amount: athlete.recordAggregationCount,
);
final List<Series<DoublePlotPoint, int>> data = <Series<DoublePlotPoint, int>>[
final List<Series<DoublePlotPoint, int>> data =
<Series<DoublePlotPoint, int>>[
Series<DoublePlotPoint, int>(
id: 'Speed per Heart Rate',
colorFn: (_, __) => Color.black,
......@@ -43,8 +44,11 @@ class ActivitySpeedPerHeartRateChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -44,8 +44,11 @@ class ActivityStrideRatioChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -32,7 +32,8 @@ class ActivityStrydCadenceChart extends StatelessWidget {
amount: athlete.recordAggregationCount,
);
final List<Series<DoublePlotPoint, int>> data = <Series<DoublePlotPoint, int>>[
final List<Series<DoublePlotPoint, int>> data =
<Series<DoublePlotPoint, int>>[
Series<DoublePlotPoint, int>(
id: 'Cadence',
colorFn: (_, __) => Color.black,
......@@ -47,8 +48,11 @@ class ActivityStrydCadenceChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -48,8 +48,11 @@ class ActivityVerticalOscillationChart extends StatelessWidget {
builder: (BuildContext context, AsyncSnapshot<List<Lap>> snapshot) {
if (snapshot.hasData) {
final List<Lap> laps = snapshot.data;
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
child: MyLineChart(
data: data,
maxDomain: records.last.distance,
......
......@@ -14,7 +14,8 @@ class FtpChart extends StatelessWidget {
final PowerDuration powerDuration = PowerDuration(records: records);
final PowerDuration ftpCurve = powerDuration.normalize();
final List<Series<DoublePlotPoint, num>> data = <Series<DoublePlotPoint, num>>[
final List<Series<DoublePlotPoint, num>> data =
<Series<DoublePlotPoint, num>>[
Series<DoublePlotPoint, int>(
id: 'Power Duration',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
......@@ -25,7 +26,7 @@ class FtpChart extends StatelessWidget {
];
final StaticNumericTickProviderSpec staticTicks =
StaticNumericTickProviderSpec(<TickSpec<int>>[
StaticNumericTickProviderSpec(<TickSpec<int>>[
TickSpec<int>(PowerDuration.scaled(seconds: 1), label: '1s'),
TickSpec<int>(PowerDuration.scaled(seconds: 10), label: '10s'),
TickSpec<int>(PowerDuration.scaled(seconds: 60), label: '1min'),
......@@ -54,13 +55,14 @@ class FtpChart extends StatelessWidget {
),
];
return Container(
height: 300,
padding: const EdgeInsets.all(2),
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: const NumericAxisSpec(
tickProviderSpec: BasicNumericTickProviderSpec(
......
......@@ -29,12 +29,14 @@ class LapAltitudeChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
tickProviderSpec: const BasicNumericTickProviderSpec(
......@@ -51,3 +53,4 @@ class LapAltitudeChart extends StatelessWidget {
);
}
}
......@@ -27,12 +27,14 @@ class LapEcorChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: const NumericAxisSpec(
tickProviderSpec: BasicNumericTickProviderSpec(
......
......@@ -29,12 +29,14 @@ class LapFormPowerChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
tickProviderSpec: const BasicNumericTickProviderSpec(
......
......@@ -29,12 +29,14 @@ class LapGroundTimeChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
tickProviderSpec: const BasicNumericTickProviderSpec(
......
......@@ -30,12 +30,14 @@ class LapHeartRateChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
viewport: MyLineChart.determineViewport(
......
......@@ -29,13 +29,15 @@ class LapLegSpringStiffnessChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
animate: false,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
tickProviderSpec: const BasicNumericTickProviderSpec(
......
......@@ -29,12 +29,14 @@ class LapPaceChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
tickProviderSpec: const BasicNumericTickProviderSpec(
......@@ -42,7 +44,7 @@ class LapPaceChart extends StatelessWidget {
dataIsInWholeNumbers: false,
desiredTickCount: 5,
),
viewport: NumericExtents(minimum, maximum),
viewport: NumericExtents(minimum, maximum),
),
animate: false,
behaviors: GraphUtils.axis(
......
......@@ -30,12 +30,14 @@ class LapPowerChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
viewport: MyLineChart.determineViewport(
......
......@@ -29,12 +29,14 @@ class LapSpeedChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),
primaryMeasureAxis: NumericAxisSpec(
tickProviderSpec: const BasicNumericTickProviderSpec(
......
......@@ -29,12 +29,14 @@ class LapStrydCadenceChart extends StatelessWidget {
)
];
return Container(
height: 300,
return AspectRatio(
aspectRatio:
MediaQuery.of(context).orientation == Orientation.portrait ? 1 : 2,
child: LineChart(
data,
defaultRenderer: LineRendererConfig<num>(
includeArea: true,
strokeWidthPx: 1,
),