You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/widgets/charts/app_time_series_chart.dart

78 lines
2.2 KiB
Dart

import 'package:flutter_charts/flutter_charts.dart' as charts;
// import 'package:charts_flutter/flutter.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/widgets/data_display/list/flexible_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
/// App Time Series Chart
/// [seriesList] the series list
/// [chartName] the name of the chart
/// [startDate] the start date
/// [endDate] the end date
// class AppTimeSeriesChar,b m extends StatelessWidget {
// AppTimeSeriesChart({
// Key? key,
// required this.seriesList,
// this.chartName = '',
// this.startDate,
// this.endDate,
// });
//
// final String chartName;
// final List<Series<dynamic, DateTime>> seriesList;
// final DateTime? startDate;
// final DateTime? endDate;
//
// @override
// Widget build(BuildContext context) {
// return FlexibleContainer(
// heightFactor: 0.47,
// child: Column(
// children: <Widget>[
// Texts(chartName, fontSize: SizeConfig.textMultiplier * 3),
// Container(
// height: SizeConfig.realScreenHeight * 0.37,
// child: Center(
// child: Container(
// child: charts.LineChart(
// seriesList,
// animate: true,
// behaviors: [
// charts.RangeAnnotation(
// [
// charts.RangeAnnotationSegment(startDate, endDate,
// charts.RangeAnnotationAxisType.domain ),
// ],
// ),
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// );
// }
// }
class TimeSeriesSales {
final DateTime time;
final int sales;
TimeSeriesSales(this.time, this.sales);
}
class TimeSeriesSales2 {
final DateTime time;
final double sales;
TimeSeriesSales2(this.time, this.sales);
}
class TimeSeriesSales3 {
final dynamic time;
final double sales;
TimeSeriesSales3(this.time, this.sales);
}