From 542a1aebe872632e69b4a42ff629d13bb4e8d6d0 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 22 七月 2025 09:31:14 +0800
Subject: [PATCH] Merge branch '1.3.1'
---
aa_chart_core/src/main/java/com/github/AAChartModel/AAChartCore/AAChartCreator/AAChartModel.java | 147 ++++++++++++++++++++++++++++--------------------
1 files changed, 86 insertions(+), 61 deletions(-)
diff --git a/aa_chart_core/src/main/java/com/github/AAChartModel/AAChartCore/AAChartCreator/AAChartModel.java b/aa_chart_core/src/main/java/com/github/AAChartModel/AAChartCore/AAChartCreator/AAChartModel.java
index f4e5226..4b0caf0 100644
--- a/aa_chart_core/src/main/java/com/github/AAChartModel/AAChartCore/AAChartCreator/AAChartModel.java
+++ b/aa_chart_core/src/main/java/com/github/AAChartModel/AAChartCore/AAChartCreator/AAChartModel.java
@@ -1,22 +1,22 @@
/**
-// AAChartModel.java
-// AAChartCore
-//
-// Created by AnAn on 2017/9/5.
-// Copyright 漏 2018骞� An An. All rights reserved.
-
+ * // AAChartModel.java
+ * // AAChartCore
+ * //
+ * // Created by AnAn on 2017/9/5.
+ * // Copyright 漏 2018骞� An An. All rights reserved.
+ * <p>
* 鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼� ...... SOURCE CODE ......鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼�
* 鈼夆棄鈼�................................................... 鈼夆棄鈼�
* 鈼夆棄鈼� https://github.com/AAChartModel/AAChartCore 鈼夆棄鈼�
* 鈼夆棄鈼� https://github.com/AAChartModel/AAChartCore-Kotlin 鈼夆棄鈼�
* 鈼夆棄鈼�................................................... 鈼夆棄鈼�
* 鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼� ...... SOURCE CODE ......鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼夆棄鈼�
-
-
+ * <p>
+ * <p>
* -------------------------------------------------------------------------------
- *
- * 馃寱 馃寲 馃寳 馃寴 鉂�鉂�鉂� WARM TIPS!!! 鉂�鉂�鉂� 馃寫 馃寬 馃寭 馃寯
- *
+ * <p>
+ * 馃寱 馃寲 馃寳 馃寴 鉂�鉂�鉂� WARM TIPS!!! 鉂�鉂�鉂� 馃寫 馃寬 馃寭 馃寯
+ * <p>
* Please contact me on GitHub,if there are any problems encountered in use.
* GitHub Issues : https://github.com/AAChartModel/AAChartCore/issues
* -------------------------------------------------------------------------------
@@ -25,9 +25,8 @@
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
* JianShu : http://www.jianshu.com/u/f1e6753d4254
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
- *
+ * <p>
* -------------------------------------------------------------------------------
-
*/
package com.github.AAChartModel.AAChartCore.AAChartCreator;
@@ -44,51 +43,55 @@
public class AAChartModel {
- public String animationType; //鍔ㄧ敾绫诲瀷
+ public String animationType; //鍔ㄧ敾绫诲瀷
public Integer animationDuration; //鍔ㄧ敾鏃堕棿
- public String title; //鏍囬鍐呭
+ public String title; //鏍囬鍐呭
public AAStyle titleStyle; //鏍囬鏂囨湰椋庢牸鏍峰紡
- public String subtitle; //鍓爣棰樺唴瀹�
- public String subtitleAlign; //鍓爣棰樻按骞冲榻愭柟寮�
+ public String subtitle; //鍓爣棰樺唴瀹�
+ public String subtitleAlign; //鍓爣棰樻按骞冲榻愭柟寮�
public AAStyle subtitleStyle; //鍓爣棰樻枃鏈鏍兼牱寮�
- public String axesTextColor; //x 杞村拰 y 杞存枃瀛楅鑹�
- public String chartType; //鍥捐〃绫诲瀷
- public String stacking; //鍫嗙Н鏍峰紡
- public String markerSymbol; //鎶樼嚎鏇茬嚎杩炴帴鐐圭殑绫诲瀷锛�"circle", "square", "diamond", "triangle","triangle-down"锛岄粯璁ゆ槸"circle"
- public String markerSymbolStyle; //鎶樼嚎鏇茬嚎杩炴帴鐐圭殑鑷畾涔夐鏍兼牱寮�
- public String zoomType; //缂╂斁绫诲瀷 AAChartZoomTypeX琛ㄧず鍙部鐫� x 杞磋繘琛屾墜鍔跨缉鏀�
+ public String axesTextColor; //x 杞村拰 y 杞存枃瀛楅鑹�
+ public String chartType; //鍥捐〃绫诲瀷
+ public String stacking; //鍫嗙Н鏍峰紡
+ public String markerSymbol; //鎶樼嚎鏇茬嚎杩炴帴鐐圭殑绫诲瀷锛�"circle", "square", "diamond", "triangle","triangle-down"锛岄粯璁ゆ槸"circle"
+ public String markerSymbolStyle; //鎶樼嚎鏇茬嚎杩炴帴鐐圭殑鑷畾涔夐鏍兼牱寮�
+ public String zoomType; //缂╂斁绫诲瀷 AAChartZoomTypeX琛ㄧず鍙部鐫� x 杞磋繘琛屾墜鍔跨缉鏀�
public Boolean inverted; //x 杞存槸鍚︾炕杞�(鍨傜洿)
public Boolean xAxisReversed; //x 杞寸炕杞�
public Boolean yAxisReversed; //y 杞寸炕杞�
public Boolean tooltipEnabled; //鏄惁鏄剧ず娴姩鎻愮ず妗�(榛樿鏄剧ず)
- public String tooltipValueSuffix; //娴姩鎻愮ず妗嗗崟浣嶅悗缂�
+ public String tooltipValueSuffix; //娴姩鎻愮ず妗嗗崟浣嶅悗缂�
public Boolean gradientColorEnable; //鏄惁瑕佷负娓愬彉鑹�
public Boolean polar; //鏄惁鏋佸寲鍥惧舰(鍙樹负闆疯揪鍥�)
- public Number[]margin; //鍥捐〃澶栬竟缂樺拰缁樺浘鍖哄煙涔嬮棿鐨勮竟璺�
+ public Number[] margin; //鍥捐〃澶栬竟缂樺拰缁樺浘鍖哄煙涔嬮棿鐨勮竟璺�
public Boolean dataLabelsEnabled; //鏄惁鏄剧ず鏁版嵁
public AAStyle dataLabelsStyle; //鏁版嵁鏂囨湰椋庢牸鏍峰紡
public Boolean xAxisLabelsEnabled; //x 杞存槸鍚︽樉绀烘暟鎹�
public Integer xAxisTickInterval; //x 杞村埢搴︾偣闂撮殧鏁�(璁剧疆姣忛殧鍑犱釜鐐规樉绀轰竴涓� X杞寸殑鍐呭)
- public String[]categories; //x 杞存槸鍚︽樉绀烘暟鎹�
- public Number xAxisGridLineWidth; //x 杞寸綉鏍肩嚎鐨勫搴�
+ public String[] categories; //x 杞存槸鍚︽樉绀烘暟鎹�
+ public Number xAxisGridLineWidth; //x 杞寸綉鏍肩嚎鐨勫搴�
+ public String xAxisGridLineColor; //x 杞寸綉鏍肩嚎鐨勯鑹�
public Boolean xAxisVisible; //x 杞存槸鍚︽樉绀�
+ public String xAxisColor; //x 杞撮鑹�
+ public Number xAxisLineWidth; //x 杞寸嚎瀹藉害
+
public Boolean yAxisVisible; //y 杞存槸鍚︽樉绀�
public Boolean yAxisLabelsEnabled; //y 杞存槸鍚︽樉绀烘暟鎹�
- public String yAxisTitle; //y 杞存爣棰�
- public Number yAxisLineWidth; //y 杞磋酱绾跨殑瀹藉害
- public Number yAxisMin; //y 杞存渶灏忓��
- public Number yAxisMax; //y 杞存渶澶у��
+ public String yAxisTitle; //y 杞存爣棰�
+ public Number yAxisLineWidth; //y 杞磋酱绾跨殑瀹藉害
+ public Number yAxisMin; //y 杞存渶灏忓��
+ public Number yAxisMax; //y 杞存渶澶у��
public Boolean yAxisAllowDecimals; //y 杞存槸鍚﹀厑璁告樉绀哄皬鏁�
- public Number yAxisGridLineWidth; //y 杞寸綉鏍肩嚎鐨勫搴�
- public Object[]colorsTheme; //鍥捐〃涓婚棰滆壊鏁扮粍
+ public Number yAxisGridLineWidth; //y 杞寸綉鏍肩嚎鐨勫搴�
+ public String yAxisGridLineColor; //y 杞寸綉鏍肩嚎鐨勫搴�
+ public Object[] colorsTheme; //鍥捐〃涓婚棰滆壊鏁扮粍
public Boolean legendEnabled; //鏄惁鏄剧ず鍥句緥
- public Object backgroundColor; //鍥捐〃鑳屾櫙鑹�
- public Number borderRadius; //鏌辩姸鍥鹃暱鏉″浘澶撮儴鍦嗚鍗婂緞(鍙敤浜庤缃ご閮ㄧ殑褰㈢姸,浠呭鏉″舰鍥�,鏌辩姸鍥炬湁鏁�)
- public Number markerRadius; //鎶樼嚎杩炴帴鐐圭殑鍗婂緞闀垮害
- public Object[]series; //鍥捐〃鐨勬暟鎹垪鍐呭
+ public Object backgroundColor; //鍥捐〃鑳屾櫙鑹�
+ public Number borderRadius; //鏌辩姸鍥鹃暱鏉″浘澶撮儴鍦嗚鍗婂緞(鍙敤浜庤缃ご閮ㄧ殑褰㈢姸,浠呭鏉″舰鍥�,鏌辩姸鍥炬湁鏁�)
+ public Number markerRadius; //鎶樼嚎杩炴帴鐐圭殑鍗婂緞闀垮害
+ public Object[] series; //鍥捐〃鐨勬暟鎹垪鍐呭
public Boolean touchEventEnabled; //鏄惁鏀寔鐢ㄦ埛瑙︽懜浜嬩欢
public AAScrollablePlotArea scrollablePlotArea;
-
public AAChartModel animationType(String prop) {
@@ -226,8 +229,30 @@
return this;
}
+ public AAChartModel xAxisGridLineColor(String prop) {
+ xAxisGridLineColor = prop;
+ return this;
+
+
+ }
+
+ public AAChartModel xAxisColor(String prop) {
+ xAxisColor = prop;
+ return this;
+ }
+
+ public AAChartModel xAxisLineWidth(Number prop) {
+ xAxisLineWidth = prop;
+ return this;
+ }
+
public AAChartModel yAxisGridLineWidth(Number prop) {
yAxisGridLineWidth = prop;
+ return this;
+ }
+
+ public AAChartModel yAxisGridLineColor(String prop) {
+ yAxisGridLineColor = prop;
return this;
}
@@ -317,29 +342,29 @@
}
public AAChartModel() {
- chartType = AAChartType.Line;
- title = "";
- yAxisTitle = "";
- animationDuration = 500;//浠ユ绉掍负鍗曚綅
- animationType = AAChartAnimationType.Linear;
- inverted = false;
- stacking = AAChartStackingType.False;
- xAxisReversed = false;
- yAxisReversed = false;
- zoomType = AAChartZoomType.None;
- dataLabelsEnabled = false;
- markerSymbolStyle = AAChartSymbolStyleType.Normal;
- colorsTheme = new String[]{"#fe117c","#ffc069","#06caf4","#7dffc0"};//榛樿鐨勯鑹叉暟缁�(蹇呴』瑕佹坊鍔犻粯璁ゆ暟缁�,鍚﹀垯灏变細鍑洪敊)
- gradientColorEnable = false;
- polar = false;
- xAxisLabelsEnabled = true;
- xAxisGridLineWidth = 0f;
- yAxisLabelsEnabled = true;
- yAxisGridLineWidth = 1f;
- legendEnabled = true;
- backgroundColor = "#ffffff";
- borderRadius = 0f;//鏌辩姸鍥鹃暱鏉″浘澶撮儴鍦嗚鍗婂緞(鍙敤浜庤缃ご閮ㄧ殑褰㈢姸,浠呭鏉″舰鍥�,鏌辩姸鍥炬湁鏁�,璁剧疆涓�1000鏃�,鏌卞舰鍥炬垨鑰呮潯褰㈠浘澶撮儴涓烘褰�)
- markerRadius = 6f;//鎶樼嚎杩炴帴鐐圭殑鍗婂緞闀垮害,濡傛灉鍊艰缃负0,杩欐牱灏辩浉褰撲簬涓嶆樉绀轰簡
+ chartType = AAChartType.Line;
+ title = "";
+ yAxisTitle = "";
+ animationDuration = 500;//浠ユ绉掍负鍗曚綅
+ animationType = AAChartAnimationType.Linear;
+ inverted = false;
+ stacking = AAChartStackingType.False;
+ xAxisReversed = false;
+ yAxisReversed = false;
+ zoomType = AAChartZoomType.None;
+ dataLabelsEnabled = false;
+ markerSymbolStyle = AAChartSymbolStyleType.Normal;
+ colorsTheme = new String[]{"#fe117c", "#ffc069", "#06caf4", "#7dffc0"};//榛樿鐨勯鑹叉暟缁�(蹇呴』瑕佹坊鍔犻粯璁ゆ暟缁�,鍚﹀垯灏变細鍑洪敊)
+ gradientColorEnable = false;
+ polar = false;
+ xAxisLabelsEnabled = true;
+ xAxisGridLineWidth = 0f;
+ yAxisLabelsEnabled = true;
+ yAxisGridLineWidth = 1f;
+ legendEnabled = true;
+ backgroundColor = "#333738";
+ borderRadius = 0f;//鏌辩姸鍥鹃暱鏉″浘澶撮儴鍦嗚鍗婂緞(鍙敤浜庤缃ご閮ㄧ殑褰㈢姸,浠呭鏉″舰鍥�,鏌辩姸鍥炬湁鏁�,璁剧疆涓�1000鏃�,鏌卞舰鍥炬垨鑰呮潯褰㈠浘澶撮儴涓烘褰�)
+ markerRadius = 6f;//鎶樼嚎杩炴帴鐐圭殑鍗婂緞闀垮害,濡傛灉鍊艰缃负0,杩欐牱灏辩浉褰撲簬涓嶆樉绀轰簡
}
}
--
Gitblit v1.8.0