An An пре 3 месеци
родитељ
комит
1015c89f37

+ 121 - 45
charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAPlotOptions.kt

@@ -93,12 +93,13 @@ open class AABaseColumn {
         null//Padding between each column or bar, in x axis units. 默认是:0.1.
     var groupPadding: Float? =
         null//Padding between each value groups, in x axis units. 默认是:0.2.
+    var borderColor: String? = null
+    var borderRadius: Number? = null
     var borderWidth: Number? = null
     var colorByPoint: Boolean? =
         null//对每个不同的点设置颜色(当图表类型为 AAColumn 时,设置为 AAColumn 对象的属性,当图表类型为 bar 时,应该设置为 bar 对象的属性才有效)
     var dataLabels: AADataLabels? = null
     var stacking: String? = null
-    var borderRadius: Number? = null
     var yAxis: Int? = null
     var pointWith: Number? = null //柱形条的宽度
     var maxPointWidth: Number? = null //柱形条的最大宽度
@@ -106,17 +107,17 @@ open class AABaseColumn {
 }
 
 open class AAColumn: AABaseColumn() {
-    fun name(prop: String): AAColumn {
+    fun name(prop: String?): AAColumn {
         name = prop
         return this
     }
 
-    fun data(prop: Array<Any>): AAColumn {
+    fun data(prop: Array<Any>?): AAColumn {
         data = prop
         return this
     }
 
-    fun color(prop: String): AAColumn {
+    fun color(prop: String?): AAColumn {
         color = prop
         return this
     }
@@ -141,6 +142,16 @@ open class AAColumn: AABaseColumn() {
         return this
     }
 
+    fun borderColor(prop: String?): AAColumn {
+        borderColor = prop
+        return this
+    }
+
+    fun borderRadius(prop: Number?): AAColumn {
+        borderRadius = prop
+        return this
+    }
+
     fun borderWidth(prop: Number?): AAColumn {
         borderWidth = prop
         return this
@@ -151,27 +162,21 @@ open class AAColumn: AABaseColumn() {
         return this
     }
 
-    fun dataLabels(prop: AADataLabels): AAColumn {
+    fun dataLabels(prop: AADataLabels?): AAColumn {
         dataLabels = prop
         return this
     }
 
-    fun stacking(prop: String): AAColumn {
+    fun stacking(prop: String?): AAColumn {
         stacking = prop
         return this
     }
 
-    fun borderRadius(prop: Number?): AAColumn {
-        borderRadius = prop
-        return this
-    }
-
     fun yAxis(prop: Int?): AAColumn {
         yAxis = prop
         return this
     }
 
-
     fun pointWidth(prop: Number?): AAColumn {
         pointWith = prop
         return this
@@ -189,18 +194,19 @@ open class AAColumn: AABaseColumn() {
 
 }
 
+
 open class AABar: AABaseColumn() {
-    fun name(prop: String): AABar {
+    fun name(prop: String?): AABar {
         name = prop
         return this
     }
 
-    fun data(prop: Array<Any>): AABar {
+    fun data(prop: Array<Any>?): AABar {
         data = prop
         return this
     }
 
-    fun color(prop: String): AABar {
+    fun color(prop: String?): AABar {
         color = prop
         return this
     }
@@ -225,6 +231,16 @@ open class AABar: AABaseColumn() {
         return this
     }
 
+    fun borderColor(prop: String?): AABar {
+        borderColor = prop
+        return this
+    }
+
+    fun borderRadius(prop: Number?): AABar {
+        borderRadius = prop
+        return this
+    }
+
     fun borderWidth(prop: Number?): AABar {
         borderWidth = prop
         return this
@@ -235,27 +251,21 @@ open class AABar: AABaseColumn() {
         return this
     }
 
-    fun dataLabels(prop: AADataLabels): AABar {
+    fun dataLabels(prop: AADataLabels?): AABar {
         dataLabels = prop
         return this
     }
 
-    fun stacking(prop: String): AABar {
+    fun stacking(prop: String?): AABar {
         stacking = prop
         return this
     }
 
-    fun borderRadius(prop: Number?): AABar {
-        borderRadius = prop
-        return this
-    }
-
     fun yAxis(prop: Int?): AABar {
         yAxis = prop
         return this
     }
 
-
     fun pointWidth(prop: Number?): AABar {
         pointWith = prop
         return this
@@ -273,6 +283,94 @@ open class AABar: AABaseColumn() {
 }
 
 
+open class AAColumnrange: AABaseColumn() {
+    fun name(prop: String?): AAColumnrange {
+        name = prop
+        return this
+    }
+
+    fun data(prop: Array<Any>?): AAColumnrange {
+        data = prop
+        return this
+    }
+
+    fun color(prop: String?): AAColumnrange {
+        color = prop
+        return this
+    }
+
+    fun grouping(prop: Boolean?): AAColumnrange {
+        grouping = prop
+        return this
+    }
+
+    fun pointPadding(prop: Float?): AAColumnrange {
+        pointPadding = prop
+        return this
+    }
+
+    fun pointPlacement(prop: Float?): AAColumnrange {
+        pointPlacement = prop
+        return this
+    }
+
+    fun groupPadding(prop: Float?): AAColumnrange {
+        groupPadding = prop
+        return this
+    }
+
+    fun borderColor(prop: String?): AAColumnrange {
+        borderColor = prop
+        return this
+    }
+
+    fun borderRadius(prop: Number?): AAColumnrange {
+        borderRadius = prop
+        return this
+    }
+
+    fun borderWidth(prop: Number?): AAColumnrange {
+        borderWidth = prop
+        return this
+    }
+
+    fun colorByPoint(prop: Boolean?): AAColumnrange {
+        colorByPoint = prop
+        return this
+    }
+
+    fun dataLabels(prop: AADataLabels?): AAColumnrange {
+        dataLabels = prop
+        return this
+    }
+
+    fun stacking(prop: String?): AAColumnrange {
+        stacking = prop
+        return this
+    }
+
+    fun yAxis(prop: Int?): AAColumnrange {
+        yAxis = prop
+        return this
+    }
+
+    fun pointWidth(prop: Number?): AAColumnrange {
+        pointWith = prop
+        return this
+    }
+
+    fun maxPointWidth(prop: Number?): AAColumnrange {
+        maxPointWidth = prop
+        return this
+    }
+
+    fun minPointLength(prop: Number?): AAColumnrange {
+        minPointLength = prop
+        return this
+    }
+}
+
+
 open class AALine {
     var dataLabels: AADataLabels? = null
 
@@ -385,28 +483,6 @@ open class AAPie {
 }
 
 
-open class AAColumnrange {
-    var borderRadius: Number? = null
-    var borderWidth: Number? = null
-    var dataLabels: AADataLabels? = null
-
-    fun borderRadius(prop: Number?): AAColumnrange {
-        borderRadius = prop
-        return this
-    }
-
-    fun borderWidth(prop: Number?): AAColumnrange {
-        borderWidth = prop
-        return this
-    }
-
-    fun dataLabels(prop: AADataLabels): AAColumnrange {
-        dataLabels = prop
-        return this
-    }
-}
-
-
 open class AAArearange {
     var dataLabels: AADataLabels? = null