- Created generated_plugin_registrant.cc and generated_plugin_registrant.h to manage plugin registration. - Added generated_plugins.cmake for plugin configuration in CMake. - Implemented CMakeLists.txt for the Windows runner, defining build settings and dependencies. - Created Runner.rc for application resources including versioning and icons. - Developed flutter_window.cpp and flutter_window.h to manage the Flutter window lifecycle. - Implemented main.cpp as the entry point for the Windows application. - Added resource.h for resource definitions. - Included app icon in resources. - Created runner.exe.manifest for application settings. - Developed utils.cpp and utils.h for console management and command line argument handling. - Implemented win32_window.cpp and win32_window.h for high DPI-aware window management.
53 lines
1.9 KiB
Dart
53 lines
1.9 KiB
Dart
import 'package:marco/controller/my_controller.dart';
|
|
import 'package:marco/model/chart_model.dart';
|
|
import 'package:marco/model/visitor_by_channels_model.dart';
|
|
import 'package:syncfusion_flutter_charts/charts.dart';
|
|
|
|
class AnalyticsController extends MyController {
|
|
String selectActivity = "Year";
|
|
List<VisitorByChannelsModel> visitorByChannel = [];
|
|
final TooltipBehavior columnChartToolTip = TooltipBehavior(enable: true, format: 'point.x : point.y', tooltipPosition: TooltipPosition.pointer);
|
|
final TooltipBehavior audienceOverview = TooltipBehavior(enable: true, format: 'point.x : point.y', tooltipPosition: TooltipPosition.pointer);
|
|
|
|
@override
|
|
void onInit() {
|
|
VisitorByChannelsModel.dummyList.then((value) {
|
|
visitorByChannel = value;
|
|
update();
|
|
});
|
|
super.onInit();
|
|
}
|
|
|
|
void onSelectedActivity(String time) {
|
|
selectActivity = time;
|
|
update();
|
|
}
|
|
|
|
void removeData(index) {
|
|
visitorByChannel.removeAt(index);
|
|
update();
|
|
}
|
|
|
|
final List<ChartSampleData> columnChart = <ChartSampleData>[
|
|
ChartSampleData(x: 2010, y: 32, yValue: 50),
|
|
ChartSampleData(x: 2011, y: 44, yValue: 40),
|
|
ChartSampleData(x: 2012, y: 40, yValue: 60),
|
|
ChartSampleData(x: 2013, y: 50, yValue: 38),
|
|
ChartSampleData(x: 2014, y: 10, yValue: 28),
|
|
ChartSampleData(x: 2015, y: 20, yValue: 16),
|
|
ChartSampleData(x: 2016, y: 30, yValue: 50),
|
|
];
|
|
|
|
final List<ChartSampleData> audienceOverviewChart = [
|
|
ChartSampleData(x: 2018, y: 50, yValue: 38),
|
|
ChartSampleData(x: 2019, y: 10, yValue: 28),
|
|
ChartSampleData(x: 2020, y: 32, yValue: 50),
|
|
ChartSampleData(x: 2020, y: 44, yValue: 40),
|
|
ChartSampleData(x: 2020, y: 40, yValue: 60),
|
|
ChartSampleData(x: 2020, y: 50, yValue: 38),
|
|
ChartSampleData(x: 2021, y: 10, yValue: 28),
|
|
ChartSampleData(x: 2022, y: 20, yValue: 16),
|
|
ChartSampleData(x: 2023, y: 30, yValue: 50)
|
|
];
|
|
}
|