Skip to content
Snippets Groups Projects
Commit 9dd2a309 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

add: chart w/sample data to quick view

parent 242ee6f2
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import '../consts.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';
import 'package:fl_chart/fl_chart.dart';
import 'quick_view_chart.dart';
class MapContainerWidget extends StatefulWidget {
final List<MarkerTemplate> markerList;
......@@ -90,16 +91,12 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
child: Stack(
children: [
Visibility( // Content only visible when box is maximized
visible: !isMinimized,
visible: !isMinimized && selectedMarker != null,
child: Center(
child: SizedBox(
width: (screenWidth * boxWidth) / 2.3,
height: (screenWidth * boxWidth) / 2.3,
child: Text(
'Placeholder',
style: regTextStyle,
),
//child: YourChartWidget(), // Replace YourChartWidget with your actual chart widget
child: const QuickViewChart(),
),
),
),
......
import 'package:flutter/material.dart';
import 'package:fl_chart/fl_chart.dart';
class QuickViewChart extends StatelessWidget {
const QuickViewChart({super.key});
@override
Widget build(BuildContext context) {
return LineChart(
LineChartData(
titlesData: FlTitlesData(
leftTitles: SideTitles(showTitles: true),
bottomTitles: SideTitles(showTitles: true),
),
borderData: FlBorderData(
show: true,
),
minX: 0, // Test data
maxX: 4,
minY: 0,
maxY: 50,
lineBarsData: [
LineChartBarData(
spots: [
FlSpot(0, 10), // Test data
FlSpot(1, 20),
FlSpot(2, 30),
FlSpot(3, 40),
],
isCurved: true,
colors: [Colors.blue],
),
],
),
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment