|
@@ -65,10 +65,10 @@ object ChartOptionsComposer {
|
|
.title("CUSTOM LEGEND STYLE")
|
|
.title("CUSTOM LEGEND STYLE")
|
|
.subtitle("LEGEND ON THE TOP_RIGHT SIDE WITH VERTICAL STYLE")
|
|
.subtitle("LEGEND ON THE TOP_RIGHT SIDE WITH VERTICAL STYLE")
|
|
.subtitleAlign(AAChartAlignType.Left)
|
|
.subtitleAlign(AAChartAlignType.Left)
|
|
- .markerRadius(0f)
|
|
|
|
|
|
+ .markerRadius(0)
|
|
.backgroundColor(AAColor.White)
|
|
.backgroundColor(AAColor.White)
|
|
.dataLabelsEnabled(false)
|
|
.dataLabelsEnabled(false)
|
|
- .yAxisGridLineWidth(0f)
|
|
|
|
|
|
+ .yAxisGridLineWidth(0)
|
|
.yAxisTitle("percent values")
|
|
.yAxisTitle("percent values")
|
|
.stacking(AAChartStackingType.Normal)
|
|
.stacking(AAChartStackingType.Normal)
|
|
.colorsTheme(arrayOf("mediumspringgreen", "deepskyblue", "red", "sandybrown"))
|
|
.colorsTheme(arrayOf("mediumspringgreen", "deepskyblue", "red", "sandybrown"))
|
|
@@ -88,17 +88,17 @@ object ChartOptionsComposer {
|
|
|
|
|
|
aaOptions.xAxis?.apply {
|
|
aaOptions.xAxis?.apply {
|
|
gridLineColor(AAColor.DarkGray)
|
|
gridLineColor(AAColor.DarkGray)
|
|
- .gridLineWidth(1f)
|
|
|
|
|
|
+ .gridLineWidth(1)
|
|
.minorGridLineColor(AAColor.LightGray)
|
|
.minorGridLineColor(AAColor.LightGray)
|
|
- .minorGridLineWidth(0.5f)
|
|
|
|
|
|
+ .minorGridLineWidth(0.5)
|
|
.minorTickInterval("auto")
|
|
.minorTickInterval("auto")
|
|
}
|
|
}
|
|
|
|
|
|
aaOptions.yAxis?.apply {
|
|
aaOptions.yAxis?.apply {
|
|
gridLineColor(AAColor.DarkGray)
|
|
gridLineColor(AAColor.DarkGray)
|
|
- .gridLineWidth(1f)
|
|
|
|
|
|
+ .gridLineWidth(1)
|
|
.minorGridLineColor(AAColor.LightGray)
|
|
.minorGridLineColor(AAColor.LightGray)
|
|
- .minorGridLineWidth(0.5f)
|
|
|
|
|
|
+ .minorGridLineWidth(0.5)
|
|
.minorTickInterval("auto")
|
|
.minorTickInterval("auto")
|
|
}
|
|
}
|
|
|
|
|
|
@@ -121,40 +121,40 @@ object ChartOptionsComposer {
|
|
val aaChartModel = AAChartModel()
|
|
val aaChartModel = AAChartModel()
|
|
.chartType(AAChartType.Spline)//图形类型
|
|
.chartType(AAChartType.Spline)//图形类型
|
|
.dataLabelsEnabled(false)
|
|
.dataLabelsEnabled(false)
|
|
- .markerRadius(0f)
|
|
|
|
|
|
+ .markerRadius(0)
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
.name("Tokyo")
|
|
.name("Tokyo")
|
|
.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))
|
|
.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))
|
|
.color(AAColor.White)
|
|
.color(AAColor.White)
|
|
- .lineWidth(10.0f)
|
|
|
|
|
|
+ .lineWidth(10.0)
|
|
))
|
|
))
|
|
|
|
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaPlotBandsElementArr = arrayOf(
|
|
val aaPlotBandsElementArr = arrayOf(
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(0f)
|
|
|
|
- .to(5f)
|
|
|
|
|
|
+ .from(0)
|
|
|
|
+ .to(5)
|
|
.color("#BC2B44"),
|
|
.color("#BC2B44"),
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(5f)
|
|
|
|
- .to(10f)
|
|
|
|
|
|
+ .from(5)
|
|
|
|
+ .to(10)
|
|
.color("#EC6444"),
|
|
.color("#EC6444"),
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(10f)
|
|
|
|
- .to(15f)
|
|
|
|
|
|
+ .from(10)
|
|
|
|
+ .to(15)
|
|
.color("#f19742"),
|
|
.color("#f19742"),
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(15f)
|
|
|
|
- .to(20f)
|
|
|
|
|
|
+ .from(15)
|
|
|
|
+ .to(20)
|
|
.color("#f3da60"),
|
|
.color("#f3da60"),
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(20f)
|
|
|
|
- .to(25f)
|
|
|
|
|
|
+ .from(20)
|
|
|
|
+ .to(25)
|
|
.color("#9bd040"),
|
|
.color("#9bd040"),
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(25f)
|
|
|
|
- .to(50f)
|
|
|
|
|
|
+ .from(25)
|
|
|
|
+ .to(50)
|
|
.color("#acf08f")
|
|
.color("#acf08f")
|
|
)
|
|
)
|
|
|
|
|
|
@@ -211,8 +211,8 @@ object ChartOptionsComposer {
|
|
AAPlotLinesElement()
|
|
AAPlotLinesElement()
|
|
.color("#1e90ff")//颜色值(16进制)
|
|
.color("#1e90ff")//颜色值(16进制)
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDotDot)//样式:Dash,Dot,Solid等,默认Solid
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDotDot)//样式:Dash,Dot,Solid等,默认Solid
|
|
- .width(1f) //标示线粗细
|
|
|
|
- .value(12f) //所在位置
|
|
|
|
|
|
+ .width(1) //标示线粗细
|
|
|
|
+ .value(12) //所在位置
|
|
.zIndex(1) //层叠,标示线在图表中显示的层叠级别,值越大,显示越向前
|
|
.zIndex(1) //层叠,标示线在图表中显示的层叠级别,值越大,显示越向前
|
|
.label(AALabel()
|
|
.label(AALabel()
|
|
.useHTML(true)
|
|
.useHTML(true)
|
|
@@ -221,8 +221,8 @@ object ChartOptionsComposer {
|
|
AAPlotLinesElement()
|
|
AAPlotLinesElement()
|
|
.color("#ef476f")//颜色值(16进制)
|
|
.color("#ef476f")//颜色值(16进制)
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDot)//样式:Dash,Dot,Solid等,默认Solid
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDot)//样式:Dash,Dot,Solid等,默认Solid
|
|
- .width(1f) //标示线粗细
|
|
|
|
- .value(24f) //所在位置
|
|
|
|
|
|
+ .width(1) //标示线粗细
|
|
|
|
+ .value(24) //所在位置
|
|
.zIndex(1) //层叠,标示线在图表中显示的层叠级别,值越大,显示越向前
|
|
.zIndex(1) //层叠,标示线在图表中显示的层叠级别,值越大,显示越向前
|
|
.label(AALabel()
|
|
.label(AALabel()
|
|
.useHTML(true)
|
|
.useHTML(true)
|
|
@@ -231,8 +231,8 @@ object ChartOptionsComposer {
|
|
AAPlotLinesElement()
|
|
AAPlotLinesElement()
|
|
.color("#1e90ff")//颜色值(16进制)
|
|
.color("#1e90ff")//颜色值(16进制)
|
|
.dashStyle(AAChartLineDashStyleType.LongDash)//样式:Dash,Dot,Solid等,默认Solid
|
|
.dashStyle(AAChartLineDashStyleType.LongDash)//样式:Dash,Dot,Solid等,默认Solid
|
|
- .width(1f) //标示线粗细
|
|
|
|
- .value(36f) //所在位置
|
|
|
|
|
|
+ .width(1) //标示线粗细
|
|
|
|
+ .value(36) //所在位置
|
|
.zIndex(1) //层叠,标示线在图表中显示的层叠级别,值越大,显示越向前
|
|
.zIndex(1) //层叠,标示线在图表中显示的层叠级别,值越大,显示越向前
|
|
.label(AALabel()
|
|
.label(AALabel()
|
|
.useHTML(true)
|
|
.useHTML(true)
|
|
@@ -264,7 +264,7 @@ object ChartOptionsComposer {
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
.name("2020")
|
|
.name("2020")
|
|
- .lineWidth(3f)
|
|
|
|
|
|
+ .lineWidth(3)
|
|
.color("#FFD700"/*纯金色*/)
|
|
.color("#FFD700"/*纯金色*/)
|
|
.fillOpacity(0.5f)
|
|
.fillOpacity(0.5f)
|
|
.data(arrayOf(
|
|
.data(arrayOf(
|
|
@@ -294,7 +294,7 @@ function () {
|
|
.borderColor("#000000")
|
|
.borderColor("#000000")
|
|
.style(AAStyle()
|
|
.style(AAStyle()
|
|
.color("#FFD700")
|
|
.color("#FFD700")
|
|
- .fontSize(12f))
|
|
|
|
|
|
+ .fontSize(12))
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
aaOptions.tooltip = aaTooltip
|
|
aaOptions.tooltip = aaTooltip
|
|
return aaOptions
|
|
return aaOptions
|
|
@@ -344,7 +344,7 @@ function () {
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaCrosshair = AACrosshair()
|
|
val aaCrosshair = AACrosshair()
|
|
.color(AAColor.Red)
|
|
.color(AAColor.Red)
|
|
- .width(1f)
|
|
|
|
|
|
+ .width(1)
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDotDot)
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDotDot)
|
|
aaOptions.xAxis?.crosshair(aaCrosshair)
|
|
aaOptions.xAxis?.crosshair(aaCrosshair)
|
|
return aaOptions
|
|
return aaOptions
|
|
@@ -371,7 +371,7 @@ function () {
|
|
.stacking(AAChartStackingType.Normal)
|
|
.stacking(AAChartStackingType.Normal)
|
|
.categories(categories)
|
|
.categories(categories)
|
|
.dataLabelsEnabled(false)
|
|
.dataLabelsEnabled(false)
|
|
- .markerRadius(0f)
|
|
|
|
|
|
+ .markerRadius(0)
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
.name("Berlin Hot")
|
|
.name("Berlin Hot")
|
|
@@ -405,7 +405,7 @@ function () {
|
|
.stacking(AAChartStackingType.Normal)
|
|
.stacking(AAChartStackingType.Normal)
|
|
.categories(categories)
|
|
.categories(categories)
|
|
.dataLabelsEnabled(false)
|
|
.dataLabelsEnabled(false)
|
|
- .markerRadius(0f)
|
|
|
|
|
|
+ .markerRadius(0)
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
.name("Berlin Hot")
|
|
.name("Berlin Hot")
|
|
@@ -439,12 +439,12 @@ function () {
|
|
.yAxisVisible(true)
|
|
.yAxisVisible(true)
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月"))
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月"))
|
|
- .markerRadius(0f)
|
|
|
|
|
|
+ .markerRadius(0)
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
.name("Berlin Hot")
|
|
.name("Berlin Hot")
|
|
.color(AAColor.White)
|
|
.color(AAColor.White)
|
|
- .lineWidth(7f)
|
|
|
|
|
|
+ .lineWidth(7)
|
|
.fillColor(fillColorGradientColor)
|
|
.fillColor(fillColorGradientColor)
|
|
.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))
|
|
.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))
|
|
))
|
|
))
|
|
@@ -454,34 +454,34 @@ function () {
|
|
.enabled(true)
|
|
.enabled(true)
|
|
.style(AAStyle()
|
|
.style(AAStyle()
|
|
.color(AAColor.Black)
|
|
.color(AAColor.Black)
|
|
- .fontSize(14f)
|
|
|
|
|
|
+ .fontSize(14)
|
|
.fontWeight(AAChartFontWeightType.Thin)))
|
|
.fontWeight(AAChartFontWeightType.Thin)))
|
|
|
|
|
|
val aaCrosshair = AACrosshair()
|
|
val aaCrosshair = AACrosshair()
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDot)
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDot)
|
|
.color(AAColor.White)
|
|
.color(AAColor.White)
|
|
- .width(1f)
|
|
|
|
|
|
+ .width(1)
|
|
|
|
|
|
val aaLabels = AALabels()
|
|
val aaLabels = AALabels()
|
|
.useHTML(true)
|
|
.useHTML(true)
|
|
.style(AAStyle()
|
|
.style(AAStyle()
|
|
- .fontSize(10f)
|
|
|
|
|
|
+ .fontSize(10)
|
|
.fontWeight(AAChartFontWeightType.Bold)
|
|
.fontWeight(AAChartFontWeightType.Bold)
|
|
.color(AAColor.White))//轴文字颜色
|
|
.color(AAColor.White))//轴文字颜色
|
|
|
|
|
|
aaOptions.yAxis?.apply {
|
|
aaOptions.yAxis?.apply {
|
|
opposite(true)
|
|
opposite(true)
|
|
- .tickWidth(2f)
|
|
|
|
- .lineWidth(1.5f)//Y轴轴线颜色
|
|
|
|
|
|
+ .tickWidth(2)
|
|
|
|
+ .lineWidth(1.5)//Y轴轴线颜色
|
|
.lineColor(AAColor.White)//Y轴轴线颜色
|
|
.lineColor(AAColor.White)//Y轴轴线颜色
|
|
- .gridLineWidth(0f)//Y轴网格线宽度
|
|
|
|
|
|
+ .gridLineWidth(0)//Y轴网格线宽度
|
|
.crosshair(aaCrosshair)
|
|
.crosshair(aaCrosshair)
|
|
.labels(aaLabels)
|
|
.labels(aaLabels)
|
|
}
|
|
}
|
|
|
|
|
|
aaOptions.xAxis?.apply {
|
|
aaOptions.xAxis?.apply {
|
|
- tickWidth(2f)//X轴刻度线宽度
|
|
|
|
- .lineWidth(1.5f)//X轴轴线宽度
|
|
|
|
|
|
+ tickWidth(2)//X轴刻度线宽度
|
|
|
|
+ .lineWidth(1.5)//X轴轴线宽度
|
|
.lineColor(AAColor.White)//X轴轴线颜色
|
|
.lineColor(AAColor.White)//X轴轴线颜色
|
|
.crosshair(aaCrosshair)
|
|
.crosshair(aaCrosshair)
|
|
.labels(aaLabels)
|
|
.labels(aaLabels)
|
|
@@ -501,7 +501,7 @@ function () {
|
|
itemStyle(
|
|
itemStyle(
|
|
AAItemStyle()
|
|
AAItemStyle()
|
|
.color(AAColor.White)//字体颜色
|
|
.color(AAColor.White)//字体颜色
|
|
- .fontSize(13f)//字体大小
|
|
|
|
|
|
+ .fontSize(13)//字体大小
|
|
.fontWeight("thin")//字体为细体字
|
|
.fontWeight("thin")//字体为细体字
|
|
)}
|
|
)}
|
|
|
|
|
|
@@ -512,13 +512,13 @@ function () {
|
|
.chartType(AAChartType.Areaspline)
|
|
.chartType(AAChartType.Areaspline)
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月"))
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月"))
|
|
- .yAxisGridLineWidth(0f)
|
|
|
|
- .markerRadius(8f)
|
|
|
|
|
|
+ .yAxisGridLineWidth(0)
|
|
|
|
+ .markerRadius(8)
|
|
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
|
|
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
.name("New York Hot")
|
|
.name("New York Hot")
|
|
- .lineWidth(5.0f)
|
|
|
|
|
|
+ .lineWidth(5.0)
|
|
.color("rgba(220,20,60,1)")////猩红色, alpha 透明度 1
|
|
.color("rgba(220,20,60,1)")////猩红色, alpha 透明度 1
|
|
.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)),
|
|
.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)),
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
@@ -532,18 +532,18 @@ function () {
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaPlotBandsElementArr = arrayOf(
|
|
val aaPlotBandsElementArr = arrayOf(
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(-0.25f)//值域颜色带X轴起始值
|
|
|
|
- .to(4.75f)//值域颜色带X轴结束值
|
|
|
|
|
|
+ .from(-0.25)//值域颜色带X轴起始值
|
|
|
|
+ .to(4.75)//值域颜色带X轴结束值
|
|
.color("#06caf4")//值域颜色带填充色
|
|
.color("#06caf4")//值域颜色带填充色
|
|
,
|
|
,
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(4.75f)
|
|
|
|
- .to(8.25f)
|
|
|
|
|
|
+ .from(4.75)
|
|
|
|
+ .to(8.25)
|
|
.color("#ffd066")
|
|
.color("#ffd066")
|
|
,
|
|
,
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(8.25f)
|
|
|
|
- .to(11.25f)
|
|
|
|
|
|
+ .from(8.25)
|
|
|
|
+ .to(11.25)
|
|
.color("#04d69f")
|
|
.color("#04d69f")
|
|
)
|
|
)
|
|
|
|
|
|
@@ -572,10 +572,10 @@ function () {
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.style(AAStyle()
|
|
.style(AAStyle()
|
|
.color("#ff0000")//yAxis Label font color
|
|
.color("#ff0000")//yAxis Label font color
|
|
- .fontSize(15f)//yAxis Label font size
|
|
|
|
|
|
+ .fontSize(15)//yAxis Label font size
|
|
.fontWeight(AAChartFontWeightType.Bold)//yAxis Label font weight
|
|
.fontWeight(AAChartFontWeightType.Bold)//yAxis Label font weight
|
|
))
|
|
))
|
|
- .gridLineWidth(0f)// Y 轴网格线宽度
|
|
|
|
|
|
+ .gridLineWidth(0)// Y 轴网格线宽度
|
|
.title(AATitle()
|
|
.title(AATitle()
|
|
.text("收入"))//Y 轴标题
|
|
.text("收入"))//Y 轴标题
|
|
|
|
|
|
@@ -592,7 +592,7 @@ function () {
|
|
.text("正负镜像柱形图")
|
|
.text("正负镜像柱形图")
|
|
.style(AAStyle()
|
|
.style(AAStyle()
|
|
.color(AAColor.White)
|
|
.color(AAColor.White)
|
|
- .fontSize(18f)))
|
|
|
|
|
|
+ .fontSize(18)))
|
|
.xAxis(AAXAxis()
|
|
.xAxis(AAXAxis()
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月")))
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月")))
|
|
@@ -604,8 +604,8 @@ function () {
|
|
.easing(AAChartAnimationType.EaseInCirc)))
|
|
.easing(AAChartAnimationType.EaseInCirc)))
|
|
.column(AAColumn()
|
|
.column(AAColumn()
|
|
.grouping(false)
|
|
.grouping(false)
|
|
- .borderWidth(0f)
|
|
|
|
- .borderRadius(5f)))
|
|
|
|
|
|
+ .borderWidth(0)
|
|
|
|
+ .borderRadius(5)))
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
.name("收入")
|
|
.name("收入")
|
|
@@ -625,13 +625,13 @@ function () {
|
|
|
|
|
|
val aaXAxis = AAXAxis()
|
|
val aaXAxis = AAXAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
- .min(0f)
|
|
|
|
|
|
+ .min(0)
|
|
.categories(arrayOf("Java", "Swift", "Python", "Ruby", "PHP", "Go","C",
|
|
.categories(arrayOf("Java", "Swift", "Python", "Ruby", "PHP", "Go","C",
|
|
"C#", "C++", "Perl", "R", "MATLAB", "SQL"))
|
|
"C#", "C++", "Perl", "R", "MATLAB", "SQL"))
|
|
|
|
|
|
val aaYAxisTitleStyle = AAStyle()
|
|
val aaYAxisTitleStyle = AAStyle()
|
|
.color("#1e90ff")//Title font color
|
|
.color("#1e90ff")//Title font color
|
|
- .fontSize(14f)//Title font size
|
|
|
|
|
|
+ .fontSize(14)//Title font size
|
|
.fontWeight(AAChartFontWeightType.Bold)//Title font weight
|
|
.fontWeight(AAChartFontWeightType.Bold)//Title font weight
|
|
.textOutline("0px 0px contrast")
|
|
.textOutline("0px 0px contrast")
|
|
|
|
|
|
@@ -639,7 +639,7 @@ function () {
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.style(AAStyle()
|
|
.style(AAStyle()
|
|
.color("#ff0000")//yAxis Label font color
|
|
.color("#ff0000")//yAxis Label font color
|
|
- .fontSize(15f)//yAxis Label font size
|
|
|
|
|
|
+ .fontSize(15)//yAxis Label font size
|
|
.fontWeight(AAChartFontWeightType.Bold))//yAxis Label font weight
|
|
.fontWeight(AAChartFontWeightType.Bold))//yAxis Label font weight
|
|
|
|
|
|
|
|
|
|
@@ -676,10 +676,10 @@ function () {
|
|
)
|
|
)
|
|
|
|
|
|
val aaMarker = AAMarker()
|
|
val aaMarker = AAMarker()
|
|
- .radius(7f)//曲线连接点半径,默认是4
|
|
|
|
|
|
+ .radius(7)//曲线连接点半径,默认是4
|
|
.symbol(AAChartSymbolType.Circle.value)//曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
|
.symbol(AAChartSymbolType.Circle.value)//曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
|
.fillColor("#ffffff")//点的填充色(用来设置折线连接点的填充色)
|
|
.fillColor("#ffffff")//点的填充色(用来设置折线连接点的填充色)
|
|
- .lineWidth(3f)//外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
|
|
|
|
|
+ .lineWidth(3)//外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
|
.lineColor("")//外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
|
.lineColor("")//外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
|
|
|
|
|
val element1 = AASeriesElement()
|
|
val element1 = AASeriesElement()
|
|
@@ -718,13 +718,13 @@ function () {
|
|
|
|
|
|
val aaXAxis = AAXAxis()
|
|
val aaXAxis = AAXAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
- .min(0f)
|
|
|
|
|
|
+ .min(0)
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
.categories(arrayOf("一月", "二月", "三月", "四月", "五月", "六月",
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月"))
|
|
"七月", "八月", "九月", "十月", "十一月", "十二月"))
|
|
|
|
|
|
val yAxis1 = AAYAxis()
|
|
val yAxis1 = AAYAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
- .gridLineWidth(0f)
|
|
|
|
|
|
+ .gridLineWidth(0)
|
|
.labels(AALabels()
|
|
.labels(AALabels()
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.format("{value}°C")
|
|
.format("{value}°C")
|
|
@@ -738,7 +738,7 @@ function () {
|
|
|
|
|
|
val yAxis2 = AAYAxis()
|
|
val yAxis2 = AAYAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
- .gridLineWidth(0f)
|
|
|
|
|
|
+ .gridLineWidth(0)
|
|
.labels(AALabels()
|
|
.labels(AALabels()
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.format("{value}°mm")
|
|
.format("{value}°mm")
|
|
@@ -751,7 +751,7 @@ function () {
|
|
|
|
|
|
val yAxis3 = AAYAxis()
|
|
val yAxis3 = AAYAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
- .gridLineWidth(0f)
|
|
|
|
|
|
+ .gridLineWidth(0)
|
|
.labels(AALabels()
|
|
.labels(AALabels()
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.enabled(true)//设置 y 轴是否显示数字
|
|
.format("{value}°mb")
|
|
.format("{value}°mb")
|
|
@@ -773,9 +773,9 @@ function () {
|
|
.floating(true)
|
|
.floating(true)
|
|
.layout(AAChartLayoutType.Vertical)
|
|
.layout(AAChartLayoutType.Vertical)
|
|
.align(AAChartAlignType.Left)
|
|
.align(AAChartAlignType.Left)
|
|
- .x(80f)
|
|
|
|
|
|
+ .x(80)
|
|
.verticalAlign(AAChartVerticalAlignType.Top)
|
|
.verticalAlign(AAChartVerticalAlignType.Top)
|
|
- .y(55f)
|
|
|
|
|
|
+ .y(55)
|
|
|
|
|
|
val element1 = AASeriesElement()
|
|
val element1 = AASeriesElement()
|
|
.name("降雨量")
|
|
.name("降雨量")
|
|
@@ -822,7 +822,7 @@ function () {
|
|
.title("最近三十分钟数据展示")
|
|
.title("最近三十分钟数据展示")
|
|
.titleStyle(AAStyle()
|
|
.titleStyle(AAStyle()
|
|
.color("#0F0F0F")
|
|
.color("#0F0F0F")
|
|
- .fontSize(20f))
|
|
|
|
|
|
+ .fontSize(20))
|
|
//坐标轴字体颜色
|
|
//坐标轴字体颜色
|
|
.axesTextColor("#0F0F0F")
|
|
.axesTextColor("#0F0F0F")
|
|
//背景颜色
|
|
//背景颜色
|
|
@@ -839,9 +839,9 @@ function () {
|
|
//y轴标题
|
|
//y轴标题
|
|
.yAxisTitle("湿度%")
|
|
.yAxisTitle("湿度%")
|
|
//y轴最大值
|
|
//y轴最大值
|
|
- .yAxisMax(100.0f)
|
|
|
|
|
|
+ .yAxisMax(100.0)
|
|
//y轴最小值
|
|
//y轴最小值
|
|
- .yAxisMin(0.0f)
|
|
|
|
|
|
+ .yAxisMin(0.0)
|
|
.yAxisAllowDecimals(true) //y轴数据
|
|
.yAxisAllowDecimals(true) //y轴数据
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
@@ -907,24 +907,24 @@ function () {
|
|
val aaXAxis = AAXAxis()
|
|
val aaXAxis = AAXAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
.labels(aaLabels)
|
|
.labels(aaLabels)
|
|
- .min(0f)
|
|
|
|
|
|
+ .min(0)
|
|
.categories(category)
|
|
.categories(category)
|
|
val aaYAxisTitleStyle = AAStyle()
|
|
val aaYAxisTitleStyle = AAStyle()
|
|
.color("#1e90ff") //Title font color
|
|
.color("#1e90ff") //Title font color
|
|
- .fontSize(14f) //Title font size
|
|
|
|
|
|
+ .fontSize(14) //Title font size
|
|
.fontWeight(AAChartFontWeightType.Bold) //Title font weight
|
|
.fontWeight(AAChartFontWeightType.Bold) //Title font weight
|
|
.textOutline("0px 0px contrast")
|
|
.textOutline("0px 0px contrast")
|
|
val yAxis1 = AAYAxis()
|
|
val yAxis1 = AAYAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
.labels(aaLabels)
|
|
.labels(aaLabels)
|
|
- .gridLineWidth(0f)
|
|
|
|
|
|
+ .gridLineWidth(0)
|
|
.title(AATitle()
|
|
.title(AATitle()
|
|
.text("已贯通 / 计划贯通")
|
|
.text("已贯通 / 计划贯通")
|
|
.style(aaYAxisTitleStyle))
|
|
.style(aaYAxisTitleStyle))
|
|
val yAxis2 = AAYAxis()
|
|
val yAxis2 = AAYAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
.labels(aaLabels)
|
|
.labels(aaLabels)
|
|
- .gridLineWidth(0f)
|
|
|
|
|
|
+ .gridLineWidth(0)
|
|
.title(AATitle()
|
|
.title(AATitle()
|
|
.text("贯通率")
|
|
.text("贯通率")
|
|
.style(aaYAxisTitleStyle))
|
|
.style(aaYAxisTitleStyle))
|
|
@@ -948,20 +948,20 @@ function () {
|
|
.floating(true)
|
|
.floating(true)
|
|
.layout(AAChartLayoutType.Horizontal)
|
|
.layout(AAChartLayoutType.Horizontal)
|
|
.align(AAChartAlignType.Left)
|
|
.align(AAChartAlignType.Left)
|
|
- .x(30f)
|
|
|
|
|
|
+ .x(30)
|
|
.verticalAlign(AAChartVerticalAlignType.Top)
|
|
.verticalAlign(AAChartVerticalAlignType.Top)
|
|
- .y(10f)
|
|
|
|
|
|
+ .y(10)
|
|
val goalValuesElement: AASeriesElement = AASeriesElement()
|
|
val goalValuesElement: AASeriesElement = AASeriesElement()
|
|
.name("计划贯通")
|
|
.name("计划贯通")
|
|
.type(AAChartType.Column)
|
|
.type(AAChartType.Column)
|
|
- .borderWidth(0f)
|
|
|
|
|
|
+ .borderWidth(0)
|
|
.color(gradientColorDic1)
|
|
.color(gradientColorDic1)
|
|
.yAxis(0)
|
|
.yAxis(0)
|
|
.data(goalValuesArr as Array<Any>)
|
|
.data(goalValuesArr as Array<Any>)
|
|
val realValuesElement: AASeriesElement = AASeriesElement()
|
|
val realValuesElement: AASeriesElement = AASeriesElement()
|
|
.name("已贯通")
|
|
.name("已贯通")
|
|
.type(AAChartType.Column)
|
|
.type(AAChartType.Column)
|
|
- .borderWidth(0f)
|
|
|
|
|
|
+ .borderWidth(0)
|
|
.color(gradientColorDic2)
|
|
.color(gradientColorDic2)
|
|
.yAxis(0)
|
|
.yAxis(0)
|
|
.data(realValuesArr as Array<Any>)
|
|
.data(realValuesArr as Array<Any>)
|
|
@@ -969,10 +969,10 @@ function () {
|
|
.name("贯通率")
|
|
.name("贯通率")
|
|
.type(AAChartType.Line)
|
|
.type(AAChartType.Line)
|
|
.marker(AAMarker()
|
|
.marker(AAMarker()
|
|
- .radius(7f) //曲线连接点半径,默认是4
|
|
|
|
|
|
+ .radius(7) //曲线连接点半径,默认是4
|
|
.symbol(AAChartSymbolType.Circle.value) //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
|
.symbol(AAChartSymbolType.Circle.value) //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
|
.fillColor("#ffffff") //点的填充色(用来设置折线连接点的填充色)
|
|
.fillColor("#ffffff") //点的填充色(用来设置折线连接点的填充色)
|
|
- .lineWidth(3f) //外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
|
|
|
|
|
+ .lineWidth(3) //外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
|
.lineColor("") //外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
|
.lineColor("") //外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
|
)
|
|
)
|
|
.color("#F02FC2")
|
|
.color("#F02FC2")
|
|
@@ -1005,8 +1005,8 @@ function () {
|
|
.plotLines(arrayOf(
|
|
.plotLines(arrayOf(
|
|
AAPlotLinesElement()
|
|
AAPlotLinesElement()
|
|
.color(AAColor.Red)
|
|
.color(AAColor.Red)
|
|
- .value(0.1523f)
|
|
|
|
- .width(1.5f)
|
|
|
|
|
|
+ .value(0.1523)
|
|
|
|
+ .width(1.5)
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDotDot)
|
|
.dashStyle(AAChartLineDashStyleType.LongDashDotDot)
|
|
.label(AALabel()
|
|
.label(AALabel()
|
|
.text("实际价格")
|
|
.text("实际价格")
|
|
@@ -1014,31 +1014,31 @@ function () {
|
|
)))
|
|
)))
|
|
val yAxis1 = AAYAxis()
|
|
val yAxis1 = AAYAxis()
|
|
.visible(true)
|
|
.visible(true)
|
|
- .lineWidth(1f)
|
|
|
|
|
|
+ .lineWidth(1)
|
|
.title(AATitle()
|
|
.title(AATitle()
|
|
.text(""))
|
|
.text(""))
|
|
- .tickWidth(1f)
|
|
|
|
- .tickLength(5f)
|
|
|
|
|
|
+ .tickWidth(1)
|
|
|
|
+ .tickLength(5)
|
|
.tickPosition("inside")
|
|
.tickPosition("inside")
|
|
- .gridLineWidth(1f)
|
|
|
|
|
|
+ .gridLineWidth(1)
|
|
.labels(AALabels()
|
|
.labels(AALabels()
|
|
.enabled(true) //设置 y 轴是否显示数字
|
|
.enabled(true) //设置 y 轴是否显示数字
|
|
.align(AAChartAlignType.Left)
|
|
.align(AAChartAlignType.Left)
|
|
- .x(8f))
|
|
|
|
|
|
+ .x(8))
|
|
val yAxis2 = AAYAxis()
|
|
val yAxis2 = AAYAxis()
|
|
.opposite(true)
|
|
.opposite(true)
|
|
.visible(true)
|
|
.visible(true)
|
|
- .lineWidth(1f)
|
|
|
|
|
|
+ .lineWidth(1)
|
|
.title(AATitle()
|
|
.title(AATitle()
|
|
.text(""))
|
|
.text(""))
|
|
- .tickWidth(1f)
|
|
|
|
- .tickLength(5f)
|
|
|
|
|
|
+ .tickWidth(1)
|
|
|
|
+ .tickLength(5)
|
|
.tickPosition("inside")
|
|
.tickPosition("inside")
|
|
- .gridLineWidth(0f)
|
|
|
|
|
|
+ .gridLineWidth(0)
|
|
.labels(AALabels()
|
|
.labels(AALabels()
|
|
.enabled(true) //设置 y 轴是否显示数字
|
|
.enabled(true) //设置 y 轴是否显示数字
|
|
.align(AAChartAlignType.Right)
|
|
.align(AAChartAlignType.Right)
|
|
- .x(-8f))
|
|
|
|
|
|
+ .x(-8))
|
|
val aaTooltip = AATooltip()
|
|
val aaTooltip = AATooltip()
|
|
.enabled(true)
|
|
.enabled(true)
|
|
.headerFormat("<span style=\\\"font-size=10px;\\\">Price: {point.key}</span><br/>")
|
|
.headerFormat("<span style=\\\"font-size=10px;\\\">Price: {point.key}</span><br/>")
|
|
@@ -1131,7 +1131,7 @@ function () {
|
|
.colorsTheme(arrayOf("#04d69f", "#1e90ff", "#ef476f", "#ffd066"))
|
|
.colorsTheme(arrayOf("#04d69f", "#1e90ff", "#ef476f", "#ffd066"))
|
|
.stacking(AAChartStackingType.Normal)
|
|
.stacking(AAChartStackingType.Normal)
|
|
.yAxisVisible(false)
|
|
.yAxisVisible(false)
|
|
- .markerRadius(0f)
|
|
|
|
|
|
+ .markerRadius(0)
|
|
.series(arrayOf(element1, element2, element3, element4))
|
|
.series(arrayOf(element1, element2, element3, element4))
|
|
|
|
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
val aaOptions = aaChartModel.aa_toAAOptions()
|
|
@@ -1155,15 +1155,15 @@ function () {
|
|
.chart(AAChart()
|
|
.chart(AAChart()
|
|
.type(AAChartType.Gauge))
|
|
.type(AAChartType.Gauge))
|
|
.pane(AAPane()
|
|
.pane(AAPane()
|
|
- .startAngle(-150f)
|
|
|
|
- .endAngle(150f))
|
|
|
|
|
|
+ .startAngle(-150)
|
|
|
|
+ .endAngle(150))
|
|
.yAxis(AAYAxis()
|
|
.yAxis(AAYAxis()
|
|
- .min(0f)
|
|
|
|
- .max(100f)
|
|
|
|
|
|
+ .min(0)
|
|
|
|
+ .max(100)
|
|
.plotBands(arrayOf(
|
|
.plotBands(arrayOf(
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(0f)
|
|
|
|
- .to(60f)
|
|
|
|
|
|
+ .from(0)
|
|
|
|
+ .to(60)
|
|
.color("#FF0000"))))
|
|
.color("#FF0000"))))
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
AASeriesElement()
|
|
AASeriesElement()
|
|
@@ -1178,25 +1178,25 @@ function () {
|
|
.title(AATitle()
|
|
.title(AATitle()
|
|
.text("速度仪"))
|
|
.text("速度仪"))
|
|
.pane(AAPane()
|
|
.pane(AAPane()
|
|
- .startAngle(-150f)
|
|
|
|
- .endAngle(150f))
|
|
|
|
|
|
+ .startAngle(-150)
|
|
|
|
+ .endAngle(150))
|
|
.yAxis(AAYAxis()
|
|
.yAxis(AAYAxis()
|
|
- .min(0f)
|
|
|
|
- .max(200f)
|
|
|
|
|
|
+ .min(0)
|
|
|
|
+ .max(200)
|
|
.title(AATitle()
|
|
.title(AATitle()
|
|
.text("km/h"))
|
|
.text("km/h"))
|
|
.plotBands(arrayOf(
|
|
.plotBands(arrayOf(
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(0f)
|
|
|
|
- .to(120f)
|
|
|
|
|
|
+ .from(0)
|
|
|
|
+ .to(120)
|
|
.color("#ffc069"),
|
|
.color("#ffc069"),
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(120f)
|
|
|
|
- .to(160f)
|
|
|
|
|
|
+ .from(120)
|
|
|
|
+ .to(160)
|
|
.color("#fe117c"),
|
|
.color("#fe117c"),
|
|
AAPlotBandsElement()
|
|
AAPlotBandsElement()
|
|
- .from(160f)
|
|
|
|
- .to(200f)
|
|
|
|
|
|
+ .from(160)
|
|
|
|
+ .to(200)
|
|
.color("#06caf4")
|
|
.color("#06caf4")
|
|
)))
|
|
)))
|
|
.series(arrayOf(
|
|
.series(arrayOf(
|
|
@@ -1217,7 +1217,7 @@ function () {
|
|
.name("Past")
|
|
.name("Past")
|
|
.size("40%") //尺寸大小
|
|
.size("40%") //尺寸大小
|
|
.innerSize("30%") //内部圆环半径大小占比
|
|
.innerSize("30%") //内部圆环半径大小占比
|
|
- .borderWidth(0f) //描边的宽度
|
|
|
|
|
|
+ .borderWidth(0) //描边的宽度
|
|
.allowPointSelect(false) //是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
|
.allowPointSelect(false) //是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
|
.data(arrayOf(
|
|
.data(arrayOf(
|
|
arrayOf("Firefox Past", 3336.2),
|
|
arrayOf("Firefox Past", 3336.2),
|
|
@@ -1230,7 +1230,7 @@ function () {
|
|
.name("Now")
|
|
.name("Now")
|
|
.size("80%") //尺寸大小
|
|
.size("80%") //尺寸大小
|
|
.innerSize("70%") //内部圆环半径大小占比
|
|
.innerSize("70%") //内部圆环半径大小占比
|
|
- .borderWidth(0f) //描边的宽度
|
|
|
|
|
|
+ .borderWidth(0) //描边的宽度
|
|
.allowPointSelect(false) //是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
|
.allowPointSelect(false) //是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
|
.data(arrayOf(
|
|
.data(arrayOf(
|
|
arrayOf("Firefox Now", 336.2),
|
|
arrayOf("Firefox Now", 336.2),
|
|
@@ -1242,8 +1242,8 @@ function () {
|
|
|
|
|
|
val aaOptions: AAOptions = aaChartModel.aa_toAAOptions()
|
|
val aaOptions: AAOptions = aaChartModel.aa_toAAOptions()
|
|
aaOptions.plotOptions?.pie?.apply {
|
|
aaOptions.plotOptions?.pie?.apply {
|
|
- startAngle(-90f)
|
|
|
|
- endAngle(90f)
|
|
|
|
|
|
+ startAngle(-90)
|
|
|
|
+ endAngle(90)
|
|
}
|
|
}
|
|
|
|
|
|
return aaOptions
|
|
return aaOptions
|