更新快检功能必传mac参数
This commit is contained in:
@@ -124,3 +124,138 @@ class ScatterPlotChart extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// import 'dart:math' as math;
|
||||
|
||||
// import 'package:fl_chart/fl_chart.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
// import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
|
||||
// class ScatterPlotChart extends StatelessWidget {
|
||||
// final List<ScatterSpot> points;
|
||||
// final double xMin;
|
||||
// final double xMax;
|
||||
// final double yMin;
|
||||
// final double yMax;
|
||||
// final Color pointColor;
|
||||
|
||||
// ScatterPlotChart({
|
||||
// required this.points,
|
||||
// required this.xMin,
|
||||
// required this.xMax,
|
||||
// required this.yMin,
|
||||
// required this.yMax,
|
||||
// required this.pointColor,
|
||||
// });
|
||||
|
||||
// // 计算固定6格的间隔
|
||||
// double _calculateInterval(double min, double max) {
|
||||
// double range = max - min;
|
||||
// if (range <= 0) return 100; // 默认值
|
||||
|
||||
// // 固定分成6格
|
||||
// return range / 6;
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// double xInterval = _calculateInterval(xMin, xMax);
|
||||
// double yInterval = _calculateInterval(yMin, yMax);
|
||||
|
||||
// return SizedBox(
|
||||
// child: ScatterChart(
|
||||
// ScatterChartData(
|
||||
// backgroundColor: Colors.transparent,
|
||||
// gridData: FlGridData(
|
||||
// show: true,
|
||||
// horizontalInterval: yInterval,
|
||||
// verticalInterval: xInterval,
|
||||
// getDrawingHorizontalLine: (value) {
|
||||
// return FlLine(
|
||||
// color: themeController.currentColor.sc4,
|
||||
// strokeWidth: 1.rpx,
|
||||
// dashArray: [5, 5], // 设置虚线 [实线长度, 空白长度]
|
||||
// );
|
||||
// },
|
||||
// getDrawingVerticalLine: (value) {
|
||||
// return FlLine(
|
||||
// color: themeController.currentColor.sc4,
|
||||
// strokeWidth: 1.rpx,
|
||||
// dashArray: [5, 5], // 设置虚线
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// titlesData: FlTitlesData(
|
||||
// show: true,
|
||||
// leftTitles: AxisTitles(
|
||||
// sideTitles: SideTitles(
|
||||
// showTitles: true,
|
||||
// reservedSize: 70.rpx,
|
||||
// interval: yInterval,
|
||||
// getTitlesWidget: (double value, TitleMeta meta) {
|
||||
// // 显示所有刻度值
|
||||
// return Padding(
|
||||
// padding: EdgeInsets.only(right: 14.rpx),
|
||||
// child: Text(
|
||||
// value.toStringAsFixed(0),
|
||||
// style: TextStyle(
|
||||
// fontSize: 18.rpx,
|
||||
// color: themeController.currentColor.sc4,
|
||||
// ),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// textAlign: TextAlign.center,
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// bottomTitles: AxisTitles(
|
||||
// sideTitles: SideTitles(
|
||||
// showTitles: true,
|
||||
// interval: xInterval,
|
||||
// getTitlesWidget: (double value, TitleMeta meta) {
|
||||
// return Text(
|
||||
// value.toStringAsFixed(0),
|
||||
// style: TextStyle(
|
||||
// fontSize: 18.rpx,
|
||||
// color: themeController.currentColor.sc4,
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// rightTitles: AxisTitles(
|
||||
// sideTitles: SideTitles(showTitles: false),
|
||||
// ),
|
||||
// topTitles: AxisTitles(
|
||||
// sideTitles: SideTitles(showTitles: false),
|
||||
// ),
|
||||
// ),
|
||||
// borderData: FlBorderData(
|
||||
// show: true,
|
||||
// border: Border.all(
|
||||
// color: themeController.currentColor.sc4,
|
||||
// width: 0.5,
|
||||
// ),
|
||||
// ),
|
||||
// scatterSpots: points.map((point) {
|
||||
// return ScatterSpot(
|
||||
// point.x,
|
||||
// point.y,
|
||||
// dotPainter: FlDotCirclePainter(
|
||||
// radius: 3.rpx,
|
||||
// color: pointColor,
|
||||
// ),
|
||||
// );
|
||||
// }).toList(),
|
||||
// minX: xMin,
|
||||
// maxX: xMax,
|
||||
// minY: yMin,
|
||||
// maxY: yMax,
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user