Sfoglia il codice sorgente

Update CustomStyleChartComposer.kt

An An 3 anni fa
parent
commit
ac9d8b3d4a

+ 154 - 154
sample/src/main/java/com/github/aachartmodel/aainfographics/demo/chartcomposer/CustomStyleChartComposer.kt

@@ -205,20 +205,20 @@ object CustomStyleChartComposer  {
         return AAChartModel()
             .chartType(AAChartType.Spline)
             .categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"))
-            .markerRadius(0f)
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .markerRadius(0)
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Tokyo Hot")
-                    .lineWidth(9.0f)
+                    .lineWidth(9.0)
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, 21.5, 5.2, 26.5, 23.3, 45.3, 13.9, 9.6))
                     .shadow(AAShadow()
-                        .offsetX(15.0f)
-                        .offsetY(15.0f)
+                        .offsetX(15.0)
+                        .offsetY(15.0)
                         .opacity(0.2f)
-                        .width(8.0f)
+                        .width(8.0)
                         .color(AAColor.Red))))
     }
 
@@ -237,14 +237,14 @@ object CustomStyleChartComposer  {
         return AAChartModel()
             .chartType(AAChartType.Areaspline)
             .categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"))
-            .markerRadius(0f)
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .markerRadius(0)
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Tokyo Hot")
-                    .lineWidth(15.0f)
+                    .lineWidth(15.0)
                     .color(linearGradientColor)
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, 21.5, 5.2, 26.5, 23.3, 45.3, 13.9, 9.6))))
     }
@@ -266,14 +266,14 @@ object CustomStyleChartComposer  {
         return AAChartModel()
             .chartType(AAChartType.Spline)
             .categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"))
-            .markerRadius(0f)
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .markerRadius(0)
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Tokyo Hot")
-                    .lineWidth(3f)
+                    .lineWidth(3)
                     .color(linearGradientColor)
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, 21.5, 5.2, 26.5, 23.3, 45.3, 13.9, 9.6))))
     }
@@ -293,16 +293,16 @@ object CustomStyleChartComposer  {
         return AAChartModel()
             .chartType(AAChartType.Areaspline)
             .categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"))
-            .markerRadius(8f)//marker点半径为8个像素
+            .markerRadius(8)//marker点半径为8个像素
             .markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)//marker点为空心效果
             .markerSymbol(AAChartSymbolType.Circle)//marker点为圆形点○
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Tokyo Hot")
-                    .lineWidth(5.0f)
+                    .lineWidth(5.0)
                     .color("rgba(220,20,60,1)")//猩红色, alpha 透明度 1
                     .fillColor(linearGradientColor)
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, 21.5, 5.2, 26.5, 23.3, 45.3, 13.9, 9.6))))
@@ -324,26 +324,26 @@ object CustomStyleChartComposer  {
 
         val singleSpecialData = AADataElement()
             .marker(AAMarker()
-                .radius(10f)//曲线连接点半径
+                .radius(10)//曲线连接点半径
                 .symbol(AAChartSymbolType.Circle.value)//曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
                 .fillColor("#FFFFFF")//点的填充色(用来设置折线连接点的填充色)
-                .lineWidth(5f)//外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
+                .lineWidth(5)//外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
                 .lineColor("#FF0000")//外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
             )
-            .y(26.5f)
+            .y(26.5)
 
         return AAChartModel()
             .chartType(AAChartType.Spline)
             .backgroundColor("#4b2b7f")
             .dataLabelsEnabled(false)//是否显示值
             .tooltipEnabled(true)
-            .markerRadius(0f)
+            .markerRadius(0)
             .xAxisVisible(false)
             .yAxisVisible(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Virtual Data")
-                    .lineWidth(9f)
+                    .lineWidth(9)
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, singleSpecialData, 5.2, 26.5, 23.3, 45.3, 13.9, 9.6))
                     .color(gradientColorDic1)))
     }
@@ -351,19 +351,19 @@ object CustomStyleChartComposer  {
     internal fun configureSpecialStyleColumnOfSingleDataElementChart(): AAChartModel {
         val singleSpecialData = AADataElement()
             .color(AAGradientColor.FreshPapaya)
-            .y(49.5f)
+            .y(49.5)
 
         return AAChartModel()
             .chartType(AAChartType.Column)
             .dataLabelsEnabled(false)//是否显示值
             .tooltipEnabled(false)
-            .markerRadius(0f)
+            .markerRadius(0)
             .xAxisVisible(false)
             .yAxisVisible(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Virtual Data")
-                    .lineWidth(6f)
+                    .lineWidth(6)
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, singleSpecialData, 5.2, 26.5, 23.3, 26.5, 13.9, 9.6))
                     .color(AAGradientColor.OceanBlue)
             ))
@@ -378,18 +378,18 @@ object CustomStyleChartComposer  {
 
         return AAChartModel()
             .chartType(AAChartType.Area)
-            .yAxisGridLineWidth(0f)
+            .yAxisGridLineWidth(0)
             .categories(arrayOf("Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Spe", "Oct", "Nov", "Dec"))
             .dataLabelsEnabled(false)//是否显示值
-            .markerRadius(8f)
+            .markerRadius(8)
             .markerSymbol(AAChartSymbolType.Circle)
             .markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
-                    .threshold(-200f)
+                    .threshold(-200)
                     .data(arrayOf(106.4, 129.2, 269.9, -100.5, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4))
-                    .lineWidth(6f)
+                    .lineWidth(6)
                     .color("rgba(30, 144, 255,1)")
                     .fillColor(gradientColorDic1)))
     }
@@ -422,10 +422,10 @@ object CustomStyleChartComposer  {
 
         return AAChartModel()
             .chartType(AAChartType.Scatter)
-            .yAxisMax(3.5f)
-            .yAxisGridLineWidth(0f)
+            .yAxisMax(3.5)
+            .yAxisGridLineWidth(0)
             .stacking(AAChartStackingType.Normal)
-            .markerRadius(8f)
+            .markerRadius(8)
             .series(arrayOf(element1, element2, element3, element4))
     }
 
@@ -440,10 +440,10 @@ object CustomStyleChartComposer  {
     internal fun configureTriangleRadarChart(): AAChartModel {
         return AAChartModel()
             .chartType(AAChartType.Area)
-            .yAxisMax(15.0f)
-            .yAxisGridLineWidth(0f)
+            .yAxisMax(15.0)
+            .yAxisGridLineWidth(0)
             .xAxisVisible(false)
-            .markerRadius(0f)
+            .markerRadius(0)
             .polar(true)//是否极化图形
             .series(arrayOf(
                 AASeriesElement()
@@ -461,10 +461,10 @@ object CustomStyleChartComposer  {
     internal fun configureQuadrangleRadarChart(): AAChartModel {
         return AAChartModel()
             .chartType(AAChartType.Area)
-            .yAxisMax(15.0f)
-            .yAxisGridLineWidth(0f)
+            .yAxisMax(15.0)
+            .yAxisGridLineWidth(0)
             .xAxisVisible(false)
-            .markerRadius(0f)
+            .markerRadius(0)
             .polar(true)//是否极化图形
             .series(arrayOf(
                 AASeriesElement()
@@ -482,10 +482,10 @@ object CustomStyleChartComposer  {
     internal fun configurePentagonRadarChart(): AAChartModel {
         return AAChartModel()
             .chartType(AAChartType.Area)
-            .yAxisMax(15.0f)
-            .yAxisGridLineWidth(0f)
+            .yAxisMax(15.0)
+            .yAxisGridLineWidth(0)
             .xAxisVisible(false)
-            .markerRadius(0f)
+            .markerRadius(0)
             .polar(true)//是否极化图形
             .series(arrayOf(
                 AASeriesElement()
@@ -503,10 +503,10 @@ object CustomStyleChartComposer  {
     internal fun configureHexagonRadarChart(): AAChartModel {
         return AAChartModel()
             .chartType(AAChartType.Area)
-            .yAxisMax(15.0f)
-            .yAxisGridLineWidth(0f)
+            .yAxisMax(15.0)
+            .yAxisGridLineWidth(0)
             .xAxisVisible(false)
-            .markerRadius(0f)
+            .markerRadius(0)
             .polar(true)//是否极化图形
             .series(arrayOf(
                 AASeriesElement()
@@ -540,12 +540,12 @@ object CustomStyleChartComposer  {
             .chartType(AAChartType.Areaspline)
             .legendEnabled(false)
             .yAxisVisible(true)
-            .markerRadius(6f)
+            .markerRadius(6)
             .markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
             .zoomType(AAChartZoomType.XY)
             .categories(categoriesArr)
-            .yAxisMin(2.0f)
-            .yAxisMax(45.4f)
+            .yAxisMin(2.0)
+            .yAxisMax(45.4)
             .xAxisTickInterval(2)
             .series(arrayOf(
                 AASeriesElement()
@@ -579,26 +579,26 @@ object CustomStyleChartComposer  {
                     .style(AAStyle()
                         .fontWeight(AAChartFontWeightType.Bold)
                         .color(AAColor.White)
-                        .fontSize(16f))
-                    .y(-35f)
+                        .fontSize(16))
+                    .y(-35)
                     .align(AAChartAlignType.Center)
                     .verticalAlign(AAChartVerticalAlignType.Top)
                     .overflow("none")
                     .crop(false))
-            .y(26.5f)
+            .y(26.5)
 
         return AAChartModel()
             .chartType(AAChartType.Areaspline)
             .backgroundColor("#4b2b7f")
             .dataLabelsEnabled(false) //是否显示值
             .tooltipEnabled(true)
-            .markerRadius(0f)
+            .markerRadius(0)
             .xAxisVisible(false)
             .yAxisVisible(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Virtual Data")
-                    .lineWidth(6f)
+                    .lineWidth(6)
                     .color("rgba(255,215,0,1)")
                     .fillColor(gradientColorDic1) // gold color, alpha: 1.0
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, singleSpecialData, 5.2, 26.5, 23.3, 45.3, 13.9, 9.6))))
@@ -629,7 +629,7 @@ object CustomStyleChartComposer  {
             .colorsTheme(arrayOf(AAColor.Red))
             .yAxisReversed(true)
             .xAxisReversed(true)
-            .markerRadius(20f)
+            .markerRadius(20)
             .series(arrayOf(
                 AASeriesElement()
                     .name("ElementOne")
@@ -638,7 +638,7 @@ object CustomStyleChartComposer  {
                     .states(AAStates()
                         .hover(AAHover()
                             .halo(AAHalo()
-                                .size(130f)
+                                .size(130)
                                 .opacity(0.8f)
                                 .attributes(mapOf(
                                     "stroke-width" to 50,
@@ -647,12 +647,12 @@ object CustomStyleChartComposer  {
                                 ))))
                         .select(AASelect()
                             .halo(AAHalo()
-                                .size(130f)
+                                .size(130)
                                 .opacity(1.0f)
                                 .attributes(mapOf(
                                     "stroke-width" to 150,
-                                    "fill" to AARgba(138, 43, 226, 1f),
-                                    "stroke" to AARgba(30, 144, 255, 1f)
+                                    "fill" to AARgba(138, 43, 226, 1.0f),
+                                    "stroke" to AARgba(30, 144, 255, 1.0f)
                                 )))))))
     }
 
@@ -663,22 +663,22 @@ object CustomStyleChartComposer  {
             .categories(arrayOf(
                 "一月", "二月", "三月", "四月", "五月", "六月",
                 "七月", "八月", "九月", "十月", "十一月", "十二月"))
-            .markerRadius(8.0f) //marker点半径为8个像素
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .markerRadius(8.0) //marker点半径为8个像素
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Tokyo Hot")
-                    .lineWidth(5.0f)
+                    .lineWidth(5.0)
                     .color("rgba(220,20,60,1)") //猩红色, alpha 透明度 1
                     .marker(AAMarker()
                         .states(AAMarkerStates()
                             .hover(AAMarkerHover()
                                 .fillColor(AAColor.White)
-                                .radius(40f)
+                                .radius(40)
                                 .lineColor(AAColor.Green)
-                                .lineWidth(20f))))
+                                .lineWidth(20))))
                     .data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, 21.5, 5.2, 26.5, 23.3, 45.3, 13.9, 9.6))))
     }
 
@@ -707,14 +707,14 @@ object CustomStyleChartComposer  {
         )
 
         val aaDataLabels = AADataLabels()
-            .y(-10f)
+            .y(-10)
             .format("{total} mm")
             .color(AAColor.Red)
             .shape("callout")
             .backgroundColor(AAColor.White)
             .borderColor(AAColor.Red)
-            .borderRadius(1f)
-            .borderWidth(1f)
+            .borderRadius(1)
+            .borderWidth(1)
 
         val element1 = AASeriesElement()
             .name("2017")
@@ -733,8 +733,8 @@ object CustomStyleChartComposer  {
         return AAChartModel()
             .chartType(AAChartType.Column)
             .stacking(AAChartStackingType.Normal)
-            .yAxisGridLineWidth(0f)
-            .markerRadius(0f)
+            .yAxisGridLineWidth(0)
+            .markerRadius(0)
             .categories(categories)
             .colorsTheme(colorsTheme)
             .series(arrayOf(element1, element2, element3, element4))
@@ -773,7 +773,7 @@ object CustomStyleChartComposer  {
                     .name("Past")
                     .size("40%") //尺寸大小
                     .innerSize("30%") //内部圆环半径大小占比
-                    .borderWidth(0f) //描边的宽度
+                    .borderWidth(0) //描边的宽度
                     .allowPointSelect(false) //是否允许在点击数据点标记(扇形图点击选中的块发生位移)
                     .data(arrayOf(
                         arrayOf("Firefox Past", 3336.2),
@@ -786,7 +786,7 @@ object CustomStyleChartComposer  {
                     .name("Now")
                     .size("80%") //尺寸大小
                     .innerSize("70%") //内部圆环半径大小占比
-                    .borderWidth(0f) //描边的宽度
+                    .borderWidth(0) //描边的宽度
                     .allowPointSelect(false) //是否允许在点击数据点标记(扇形图点击选中的块发生位移)
                     .data(arrayOf(
                         arrayOf("Firefox Now", 336.2),
@@ -833,48 +833,48 @@ object CustomStyleChartComposer  {
             .stacking(AAChartStackingType.Normal)
             .colorsTheme(arrayOf("#1e90ff", "#ef476f", "#ffd066", "#04d69f"))
             .markerSymbol(AAChartSymbolType.Circle)
-            .markerRadius(8.0f)
+            .markerRadius(8.0)
             .markerSymbolStyle(AAChartSymbolStyleType.BorderBlank)
             .series(arrayOf(
                 AASeriesElement()
                     .name("2017")
-                    .lineWidth(5f)
+                    .lineWidth(5)
                     .data(arrayOf(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))
                     .shadow(AAShadow()
-                        .offsetX(15.0f)
-                        .offsetY(15.0f)
+                        .offsetX(15.0)
+                        .offsetY(15.0)
                         .opacity(0.2f)
-                        .width(8.0f)
+                        .width(8.0)
                         .color("#1e90ff")),
                 AASeriesElement()
                     .name("2018")
-                    .lineWidth(5f)
+                    .lineWidth(5)
                     .data(arrayOf(0.38, 0.31, 0.32, 0.32, 0.64, 0.66, 0.86, 0.47, 0.52, 0.75, 0.52, 0.56, 0.54, 0.60, 0.46, 0.63, 0.54, 0.51, 0.58, 0.64, 0.60, 0.45, 0.36, 0.67))
                     .shadow(AAShadow()
-                        .offsetX(15.0f)
-                        .offsetY(15.0f)
+                        .offsetX(15.0)
+                        .offsetY(15.0)
                         .opacity(0.2f)
-                        .width(8.0f)
+                        .width(8.0)
                         .color("#ef476f")),
                 AASeriesElement()
                     .name("2019")
-                    .lineWidth(5f)
+                    .lineWidth(5)
                     .data(arrayOf(0.46, 0.32, 0.53, 0.58, 0.86, 0.68, 0.85, 0.73, 0.69, 0.71, 0.91, 0.74, 0.60, 0.50, 0.39, 0.67, 0.55, 0.49, 0.65, 0.45, 0.64, 0.47, 0.63, 0.64))
                     .shadow(AAShadow()
-                        .offsetX(15.0f)
-                        .offsetY(15.0f)
+                        .offsetX(15.0)
+                        .offsetY(15.0)
                         .opacity(0.2f)
-                        .width(8.0f)
+                        .width(8.0)
                         .color("#ffd066")),
                 AASeriesElement()
                     .name("2020")
-                    .lineWidth(5f)
+                    .lineWidth(5)
                     .data(arrayOf(0.60, 0.51, 0.52, 0.53, 0.64, 0.84, 0.65, 0.68, 0.63, 0.47, 0.72, 0.60, 0.65, 0.74, 0.66, 0.65, 0.71, 0.59, 0.65, 0.77, 0.52, 0.53, 0.58, 0.53))
                     .shadow(AAShadow()
-                        .offsetX(15.0f)
-                        .offsetY(15.0f)
+                        .offsetX(15.0)
+                        .offsetY(15.0)
                         .opacity(0.2f)
-                        .width(8.0f)
+                        .width(8.0)
                         .color("#04d69f"))))
     }
 
@@ -886,7 +886,7 @@ object CustomStyleChartComposer  {
             .stacking(AAChartStackingType.Normal)
             .colorsTheme(arrayOf("#1e90ff", "#ef476f", "#ffd066", "#04d69f"))
             .markerSymbol(AAChartSymbolType.Circle)
-            .markerRadius(8.0f)
+            .markerRadius(8.0)
             .markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
             .series(arrayOf(
                 AASeriesElement()
@@ -895,7 +895,7 @@ object CustomStyleChartComposer  {
                     .dataLabels(AADataLabels()
                         .style(AAStyle()
                             .color("#1e90ff")
-                            .fontSize(11f)))
+                            .fontSize(11)))
                     .data(arrayOf(2.10, 2.54, 2.78, 3.62, 4.41, 4.09, 3.83, 4.47, 4.20, 3.94, 3.80, 3.58, 3.19, 4.30, 3.69, 3.52, 3.02, 3.30)),
                 AASeriesElement()
                     .name("2018")
@@ -904,7 +904,7 @@ object CustomStyleChartComposer  {
                         AADataLabels()
                             .style(AAStyle()
                                 .color("#ef476f")
-                                .fontSize(11f)))
+                                .fontSize(11)))
                     .data(arrayOf(1.56, 1.91, 2.45, 3.87, 3.24, 4.90, 4.61, 4.10, 4.17, 3.85, 4.17, 3.46, 3.46, 3.55, 3.50, 4.13, 2.58, 2.28)),
                 AASeriesElement()
                     .name("2019")
@@ -913,7 +913,7 @@ object CustomStyleChartComposer  {
                         AADataLabels()
                             .style(AAStyle()
                                 .color("#ffd066")
-                                .fontSize(11f)))
+                                .fontSize(11)))
                     .data(arrayOf(1.16, 1.67, 2.64, 2.86, 3.00, 3.21, 4.14, 4.07, 3.68, 3.11, 3.41, 3.25, 3.32, 3.07, 3.92, 3.05, 2.18, 3.24)),
                 AASeriesElement()
                     .name("2020")
@@ -922,7 +922,7 @@ object CustomStyleChartComposer  {
                         AADataLabels()
                             .style(AAStyle()
                                 .color("#04d69f")
-                                .fontSize(11f)))
+                                .fontSize(11)))
                     .data(arrayOf(5.59, 3.09, 4.09, 6.14, 5.33, 6.05, 5.71, 6.22, 6.56, 4.75, 5.27, 6.02, 5.22, 5.77, 6.19, 5.68, 4.33, 5.48))))
     }
 
@@ -976,56 +976,56 @@ object CustomStyleChartComposer  {
             .stacking(AAChartStackingType.Normal)
             .colorsTheme(arrayOf("#1e90ff", "#ef476f", "#ffd066", "#04d69f"))
             .markerSymbol(AAChartSymbolType.Circle)
-            .markerRadius(5f)
+            .markerRadius(5)
             .dataLabelsEnabled(false)
             .markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
             .series(arrayOf(
                 AASeriesElement()
                     .name("2017")
                     .fillColor(gradientBlueColorDic)
-                    .lineWidth(6f)
+                    .lineWidth(6)
                     .step(true)
                     .dataLabels(
                         AADataLabels()
                             .style(AAStyle()
                                 .color("#1e90ff")
-                                .fontSize(11f)))
+                                .fontSize(11)))
                     .data(arrayOf(2.10, 2.54, 2.78, 3.62, 4.41, 4.09, 3.83, 4.47, 4.20, 3.94, 3.80, 3.58, 3.19, 4.30, 3.69, 3.52, 3.02, 3.30)),
 
                 AASeriesElement()
                     .name("2018")
                     .fillColor(gradientRedColorDic)
-                    .lineWidth(6f)
+                    .lineWidth(6)
                     .step(true)
                     .dataLabels(
                         AADataLabels()
                             .style(AAStyle()
                                 .color("#ef476f")
-                                .fontSize(11f)))
+                                .fontSize(11)))
                     .data(arrayOf(1.56, 1.91, 2.45, 3.87, 3.24, 4.90, 4.61, 4.10, 4.17, 3.85, 4.17, 3.46, 3.46, 3.55, 3.50, 4.13, 2.58, 2.28)),
 
                 AASeriesElement()
                     .name("2019")
                     .fillColor(gradientGoldColorDic)
-                    .lineWidth(6f)
+                    .lineWidth(6)
                     .step(true)
                     .dataLabels(
                         AADataLabels()
                             .style(AAStyle()
                                 .color("#ffd066")
-                                .fontSize(11f)))
+                                .fontSize(11)))
                     .data(arrayOf(1.16, 1.67, 2.64, 2.86, 3.00, 3.21, 4.14, 4.07, 3.68, 3.11, 3.41, 3.25, 3.32, 3.07, 3.92, 3.05, 2.18, 3.24)),
 
                 AASeriesElement()
                     .name("2020")
                     .fillColor(gradientGreenColorDic)
-                    .lineWidth(6f)
+                    .lineWidth(6)
                     .step(true)
                     .dataLabels(
                         AADataLabels()
                             .style(AAStyle()
                                 .color("#04d69f")
-                                .fontSize(11f)))
+                                .fontSize(11)))
                     .data(arrayOf(5.59, 3.09, 4.09, 6.14, 5.33, 6.05, 5.71, 6.22, 6.56, 4.75, 5.27, 6.02, 5.22, 5.77, 6.19, 5.68, 4.33, 5.48))))
     }
 
@@ -1037,14 +1037,14 @@ object CustomStyleChartComposer  {
             .categories(arrayOf(
                 "一月", "二月", "三月", "四月", "五月", "六月",
                 "七月", "八月", "九月", "十月", "十一月", "十二月"))
-            .markerRadius(0f) //marker点半径为0个像素
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .markerRadius(0) //marker点半径为0个像素
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Tokyo Hot")
-                    .lineWidth(5.0f)
+                    .lineWidth(5.0)
                     .color("rgba(220,20,60,1)") //猩红色, alpha 透明度 1
                     .marker(AAMarker()
                         .states(AAMarkerStates()
@@ -1064,28 +1064,28 @@ object CustomStyleChartComposer  {
             .style(AAStyle.style(AAColor.Red, 15f, AAChartFontWeightType.Bold))
             .backgroundColor(AAColor.White) // white color
             .borderColor(AAColor.Red) // red color
-            .borderRadius(1.5f)
-            .borderWidth(1.3f)
+            .borderRadius(1.5)
+            .borderWidth(1.3)
 
         val minData = AADataElement()
             .dataLabels(aaDataLabels)
-            .y(2.5f)
+            .y(2.5)
 
         val maxData = AADataElement()
             .dataLabels(aaDataLabels)
-            .y(49.5f)
+            .y(49.5)
 
         return AAChartModel()
             .chartType(AAChartType.Spline)
             .dataLabelsEnabled(false) //是否显示值
             .tooltipEnabled(false)
-            .markerRadius(0f)
+            .markerRadius(0)
             .xAxisVisible(false)
             .yAxisVisible(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Show The Max and Min values Data Labels")
-                    .lineWidth(7f)
+                    .lineWidth(7)
                     .data(arrayOf(7.0, 6.9, minData, 14.5, 18.2, maxData, 5.2, 26.5, 23.3, 26.5, 13.9, 9.6))
                     .color(AAGradientColor.OceanBlue)
             ))
@@ -1110,7 +1110,7 @@ object CustomStyleChartComposer  {
                 "忍<br>者<br>之<br>印"
             ))
             .tooltipEnabled(false)
-            .borderRadius(3f)
+            .borderRadius(3)
             .markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
             .series(arrayOf(
                 AASeriesElement()
@@ -1135,9 +1135,9 @@ object CustomStyleChartComposer  {
             .chartType(AAChartType.Column)
             .categories(arrayOf("11/23", "11/24", "11/25", "11/26", "11/27", "11/28", "11/29"))
             //            .yAxisTickPositions([0, 10, 20, 30, 40, 50])
-            .yAxisMax(50f)
-            .yAxisMin(0f)
-            .borderRadius(5f)
+            .yAxisMax(50)
+            .yAxisMin(0)
+            .borderRadius(5)
             .series(arrayOf(
                 AAColumn()
                     .name("总做题")
@@ -1157,9 +1157,9 @@ object CustomStyleChartComposer  {
             .chartType(AAChartType.Column)
             .categories(arrayOf("11/23", "11/24", "11/25", "11/26", "11/27", "11/28", "11/29"))
             //            .yAxisTickPositions([0, 10, 20, 30, 40, 50])
-            .yAxisMax(50f)
-            .yAxisMin(0f)
-            .borderRadius(5f)
+            .yAxisMax(50)
+            .yAxisMin(0)
+            .borderRadius(5)
             .series(arrayOf(
                 AAColumn()
                     .name("总目标")
@@ -1236,7 +1236,7 @@ object CustomStyleChartComposer  {
                     .data(arrayOf(5.59, 3.09, 4.09, 6.14, 5.33, 6.05, 5.71, 6.22, 6.56, 4.75, 5.27, 6.02, 5.22, 5.77, 6.19, 5.68, 4.33, 5.48)),
                 AASeriesElement()
                     .name("NewYork Hot")
-                    .borderRadius(20f)
+                    .borderRadius(20)
                     .data(arrayOf(2.10, 2.54, 2.78, 3.62, 4.41, 4.09, 3.83, 4.47, 4.20, 3.94, 3.80, 3.58, 3.19, 4.30, 3.69, 3.52, 3.02, 3.30))
             ))
     }
@@ -1255,8 +1255,8 @@ object CustomStyleChartComposer  {
                 AASeriesElement()
                     .name("Berlin Hot")
                     .borderColor(AAColor.White)
-                    .borderWidth(3f)
-                    .borderRadius(10f)
+                    .borderWidth(3)
+                    .borderRadius(10)
                     .states(AAStates()
                         .hover(AAHover()
                             .color(AAColor.Red)))
@@ -1264,8 +1264,8 @@ object CustomStyleChartComposer  {
                 AASeriesElement()
                     .name("Beijing Hot")
                     .borderColor(AAColor.White)
-                    .borderWidth(3f)
-                    .borderRadius(10f)
+                    .borderWidth(3)
+                    .borderRadius(10)
                     .states(AAStates()
                         .hover(AAHover()
                             .color("dodgerblue"))) // Dodgerblue/道奇藍/#1e90ff十六进制颜色代码
@@ -1278,46 +1278,46 @@ object CustomStyleChartComposer  {
         return AAChartModel()
             .chartType(AAChartType.Line)
             .title("Custom Line Chart With Colorful Markers And Lines")
-            .markerRadius(18.0f) //marker点半径为8个像素
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .markerRadius(18.0) //marker点半径为8个像素
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(false)
             .series(arrayOf(
                 AASeriesElement()
                     .name("Tokyo Hot")
-                    .lineWidth(5.0f)
+                    .lineWidth(5.0)
                     .marker(AAMarker()
                         .states(AAMarkerStates()
                             .hover(AAMarkerHover()
-                                .radius(40f)
-                                .lineWidth(5f))))
+                                .radius(40)
+                                .lineWidth(5))))
                     .data(arrayOf(
                         2, 4, 8, 16, 32, 64, 128,
                         AADataElement()
-                            .y(256.0f)
+                            .y(256.0)
                             .color(AAColor.Red)))
                     .zoneAxis("x")
                     .zones(arrayOf(
                         AAZonesElement()
-                            .value(1f)
+                            .value(1)
                             .color(AAColor.Red),
                         AAZonesElement()
-                            .value(2f)
+                            .value(2)
                             .color(AAColor.Orange),
                         AAZonesElement()
-                            .value(3f)
+                            .value(3)
                             .color(AAColor.Yellow),
                         AAZonesElement()
-                            .value(4f)
+                            .value(4)
                             .color(AAColor.Green),
                         AAZonesElement()
-                            .value(5f)
+                            .value(5)
                             .color(AAColor.Cyan),
                         AAZonesElement()
-                            .value(6f)
+                            .value(6)
                             .color(AAColor.Blue),
                         AAZonesElement()
-                            .value(7f)
+                            .value(7)
                             .color(AAColor.Purple)
                     ))
             ))
@@ -1329,16 +1329,16 @@ object CustomStyleChartComposer  {
         return AAChartModel()
             .chartType(AAChartType.Line)
             .title("Custom Line Chart With Colorful Markers And Lines")
-            .markerRadius(25.0f) //marker点半径为8个像素
+            .markerRadius(25.0) //marker点半径为8个像素
             .markerSymbol(AAChartSymbolType.Circle)
-            .yAxisLineWidth(0f)
-            .yAxisGridLineWidth(0f)
+            .yAxisLineWidth(0)
+            .yAxisGridLineWidth(0)
             .legendEnabled(true)
             .stacking(AAChartStackingType.Normal)
             .series(arrayOf(
                 AASeriesElement()
                     .name(AAColor.Blue)
-                    .lineWidth(20.0f)
+                    .lineWidth(20.0)
                     .data(arrayOf(
                         2048, 1024, 1024, 1024, 1024,
                         AADataElement()
@@ -1363,11 +1363,11 @@ object CustomStyleChartComposer  {
                             .color(AARgba(30, 144, 255, 0.2f)))),
                 AASeriesElement()
                     .name(AAColor.Red)
-                    .lineWidth(20.0f)
+                    .lineWidth(20.0)
                     .data(arrayOf(
                         2048, 1024, 1024, 1024, 1024,
                         AADataElement()
-                            .y(2048f)
+                            .y(2048)
                             .color(AARgba(255, 0, 0, 1.0f))))
                     .zoneAxis("x")
                     .zones(arrayOf(
@@ -1388,11 +1388,11 @@ object CustomStyleChartComposer  {
                             .color(AARgba(255, 0, 0, 0.2f)))),
                 AASeriesElement()
                     .name(AAColor.Yellow)
-                    .lineWidth(20.0f)
+                    .lineWidth(20.0)
                     .data(arrayOf(
                         2048, 1024, 1024, 1024, 1024,
                         AADataElement()
-                            .y(2048f)
+                            .y(2048)
                             .color(AARgba(255, 215, 0, 1.0f))))
                     .zoneAxis("x")
                     .zones(arrayOf(
@@ -1413,11 +1413,11 @@ object CustomStyleChartComposer  {
                             .color(AARgba(255, 215, 0, 0.2f)))),
                 AASeriesElement()
                     .name(AAColor.Green)
-                    .lineWidth(20.0f)
+                    .lineWidth(20.0)
                     .data(arrayOf(
                         2048, 1024, 1024, 1024, 1024,
                         AADataElement()
-                            .y(2048f)
+                            .y(2048)
                             .color(AARgba(50, 205, 50, 1.0f))))
                     .zoneAxis("x")
                     .zones(arrayOf(
@@ -1438,11 +1438,11 @@ object CustomStyleChartComposer  {
                             .color(AARgba(50, 205, 50, 0.2f)))),
                 AASeriesElement()
                     .name(AAColor.Purple)
-                    .lineWidth(20.0f)
+                    .lineWidth(20.0)
                     .data(arrayOf(
                         2048, 1024, 1024, 1024, 1024,
                         AADataElement()
-                            .y(2048f)
+                            .y(2048)
                             .color(AARgba(138, 43, 226, 1.0f))))
                     .zoneAxis("x")
                     .zones(arrayOf(
@@ -1480,7 +1480,7 @@ object CustomStyleChartComposer  {
             .title("Draw Line Chart With Points Coordinates")
             .markerSymbol(AAChartSymbolType.Circle)
             .markerSymbolStyle(AAChartSymbolStyleType.BorderBlank)
-            .markerRadius(8f)
+            .markerRadius(8)
             .colorsTheme(arrayOf(AAColor.Red))
             .series(arrayOf(
                 AASeriesElement()
@@ -1515,8 +1515,8 @@ object CustomStyleChartComposer  {
             val aaDataLabels = AADataLabels()
                 .enabled(true)
                 .verticalAlign(AAChartVerticalAlignType.Middle)
-                .x(0f)
-                .y(-10f)
+                .x(0)
+                .y(-10)
             if (dataElementValue < 0) {
                 val negativeDataElement = AADataElement()
                     .y(-dataElementValue.toFloat())