diff --git a/lib/tabs/visualization.dart b/lib/tabs/visualization.dart index 3e2132a..e39d1de 100644 --- a/lib/tabs/visualization.dart +++ b/lib/tabs/visualization.dart @@ -101,8 +101,7 @@ class _VisualizationTabState extends State { const SizedBox(height: 16.0), _buildChartTypeToggle(), const SizedBox(height: 16.0), - SizedBox( - height: 300.0, + Expanded( child: _dataPoints.isEmpty ? Center( child: Text( @@ -112,7 +111,22 @@ class _VisualizationTabState extends State { ), ), ) - : _buildChart(theme), + : LayoutBuilder( + builder: (context, constraints) { + // Calculate height dynamically based on screen size + final chartHeight = constraints.maxHeight; + + return ConstrainedBox( + constraints: BoxConstraints( + maxHeight: chartHeight, + ), + child: SizedBox( + height: chartHeight, + child: _buildChart(theme), + ), + ); + }, + ), ), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index 57f5a8e..cd86d90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.4.0+14 +version: 0.4.1+15 environment: sdk: '>=3.4.3 <4.0.0'