From 5e2e1fc7fc23d5fa035608bc415e9eac73ce2e37 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 27 十一月 2024 13:11:20 +0800 Subject: [PATCH] 2024年11月27日13:11:17 --- aa_chart_core/src/main/java/com/github/AAChartModel/AAChartCore/AAChartCreator/AAChartModel.java | 120 +++++++++++++++++++++++++++++------------------------------ 1 files changed, 59 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..79330b5 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,50 @@ 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 Boolean xAxisVisible; //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 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) { @@ -317,29 +315,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 = "#FF333738"; + borderRadius = 0f;//鏌辩姸鍥鹃暱鏉″浘澶撮儴鍦嗚鍗婂緞(鍙敤浜庤缃ご閮ㄧ殑褰㈢姸,浠呭鏉″舰鍥�,鏌辩姸鍥炬湁鏁�,璁剧疆涓�1000鏃�,鏌卞舰鍥炬垨鑰呮潯褰㈠浘澶撮儴涓烘褰�) + markerRadius = 6f;//鎶樼嚎杩炴帴鐐圭殑鍗婂緞闀垮害,濡傛灉鍊艰缃负0,杩欐牱灏辩浉褰撲簬涓嶆樉绀轰簡 } } -- Gitblit v1.8.0