From 3e904bfa8a1bb53dcf461e5c717f9b808e179245 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 08 一月 2025 16:27:48 +0800
Subject: [PATCH] 2025年01月08日16:27:46
---
app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java | 46 ++++++++++++++++++++++++++++++----------------
1 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java
index 67d941a..0fe0505 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/home/aachart/BasicChartComposer.java
@@ -9,7 +9,10 @@
import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartSymbolType;
import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartType;
import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartZoomType;
+import com.github.AAChartModel.AAChartCore.AAOptionsModel.AAChart;
import com.github.AAChartModel.AAChartCore.AAOptionsModel.AAStyle;
+import com.github.AAChartModel.AAChartCore.AAOptionsModel.AATitle;
+import com.github.AAChartModel.AAChartCore.AAOptionsModel.AATooltip;
import com.github.AAChartModel.AAChartCore.AATools.AAColor;
import com.github.AAChartModel.AAChartCore.AATools.AAGradientColor;
import com.github.AAChartModel.AAChartCore.AATools.AALinearGradientDirection;
@@ -19,10 +22,10 @@
public class BasicChartComposer {
public static AAChartModel configureBasicOptions() {
return new AAChartModel()
- .backgroundColor("#EDEFF2")
+ .backgroundColor("#1C1C1E")
// .backgroundColor("#4b2b7f")
.dataLabelsEnabled(false)
- .yAxisGridLineWidth(1)
+// .yAxisGridLineWidth(0.5)
.touchEventEnabled(true);
}
@@ -52,11 +55,11 @@
// .data(new Object[]{3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8});
return configureBasicOptions()
- .backgroundColor("#EDEFF2")
+ .backgroundColor("#333738")
.legendEnabled(false)
.markerRadius(0)
// .markerSymbol(AAChartSymbolType.Circle)
-// .markerSymbolStyle(AAChartSymbolStyleType.Normal)
+ .markerSymbolStyle(AAChartSymbolStyleType.Normal)
.chartType(AAChartType.Area)
.categories(new String[]{"涓�鏈�", "浜屾湀", "涓夋湀", "鍥涙湀", "浜旀湀", "鍏湀", "涓冩湀", "鍏湀", "涔濇湀", "鍗佹湀", "鍗佷竴鏈�", "鍗佷簩鏈�"})
.series(new AASeriesElement[]{element1});
@@ -67,7 +70,18 @@
AALinearGradientDirection.ToBottom,
"rgba(56,196,148,0.5)",//娣辩矇鑹�, alpha 閫忔槑搴�1
"rgba(255,255,255,0)"//鐑儏鐨勭矇绾�, alpha 閫忔槑搴� 0.1
- );//棰滆壊瀛楃涓茶缃敮鎸佸崄鍏繘鍒剁被鍨嬪拰 rgba 绫诲瀷
+ );
+ //棰滆壊瀛楃涓茶缃敮鎸佸崄鍏繘鍒剁被鍨嬪拰 rgba 绫诲瀷
+// AAStyle aaStyle = new AAStyle();
+// aaStyle.color("#FFFFFFFF");
+// aaStyle.background("#FF555859");
+
+
+ AATooltip aaTooltip = new AATooltip()
+ .enabled(true)
+ .backgroundColor(AAColor.rgbaColor(51, 55, 56, 1f))
+ .valueDecimals(2);
+
AASeriesElement element1 = new AASeriesElement()
.name(tipSuspendName)
// .colorByPoint(true)
@@ -76,28 +90,28 @@
// .borderColor(AARgba(255,255,255,1.0f))
.fillColor(linearGradientColor)
// .fillOpacity(0.5)//鍖哄煙鑳屾櫙閫忔槑搴︼紝璁剧疆0鐨勮瘽鐪嬩笉鍒板尯鍩熻儗鏅�
+// .tooltip(aaTooltip)
.data(data);
+
// AASeriesElement element2 = new AASeriesElement()
// .name("NewYork")
-// .data(new Object[]{0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5});
-// AASeriesElement element3 = new AASeriesElement()
-// .name("London")
-// .data(new Object[]{0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0});
-// AASeriesElement element4 = new AASeriesElement()
-// .name("Berlin")
-// .data(new Object[]{3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8});
-
+// .data(new Object[]{0.45, 0.43, 0.50, 0.55, 0.58, 0.62, 0.83, 0.39, 0.56, 0.67, 0.50, 0.34, 0.50, 0.67, 0.58, 0.29, 0.46, 0.23, 0.47, 0.46, 0.38, 0.56, 0.48, 0.36});
return configureBasicOptions()
- .backgroundColor("#EDEFF2")
+ .backgroundColor("#1C1C1E")
.legendEnabled(false)
.markerRadius(0)
// .markerSymbol(AAChartSymbolType.Circle)
// .markerSymbolStyle(AAChartSymbolStyleType.Normal)
.chartType(AAChartType.Area)
.categories(categories)
-// .zoomType(AAChartZoomType.None)//鎵嬪娍缂╂斁
-// .yAxisMax(500)
+ .zoomType(AAChartZoomType.None)//鎵嬪娍缂╂斁
+ .yAxisGridLineWidth(0.10)
+ .yAxisAllowDecimals(true)
+ .xAxisVisible(true)
+// .yAxisMax(100)
.yAxisMin(0)
+ .titleStyle(AAStyle.style("#66FFFFFF", 12))//鍧愭爣杞村瓧浣撻鑹�
+// .axesTextColor("#FFFFFF")//鑳屾櫙棰滆壊
.series(new AASeriesElement[]{element1});
}
--
Gitblit v1.8.0