|
@@ -66,14 +66,12 @@ object AAOptionsConstructor {
|
|
.valueSuffix(aaChartModel.tooltipValueSuffix) //浮动提示框的单位名称后缀
|
|
.valueSuffix(aaChartModel.tooltipValueSuffix) //浮动提示框的单位名称后缀
|
|
|
|
|
|
val aaPlotOptions = AAPlotOptions()
|
|
val aaPlotOptions = AAPlotOptions()
|
|
- .series(
|
|
|
|
- AASeries()
|
|
|
|
|
|
+ .series(AASeries()
|
|
.stacking(aaChartModel.stacking) //设置是否百分比堆叠显示图形
|
|
.stacking(aaChartModel.stacking) //设置是否百分比堆叠显示图形
|
|
)
|
|
)
|
|
|
|
|
|
if (aaChartModel.animationType != AAChartAnimationType.Linear) {
|
|
if (aaChartModel.animationType != AAChartAnimationType.Linear) {
|
|
- aaPlotOptions
|
|
|
|
- .series?.animation(
|
|
|
|
|
|
+ aaPlotOptions.series?.animation(
|
|
AAAnimation()
|
|
AAAnimation()
|
|
.easing(aaChartModel.animationType)
|
|
.easing(aaChartModel.animationType)
|
|
.duration(aaChartModel.animationDuration)
|
|
.duration(aaChartModel.animationDuration)
|
|
@@ -85,10 +83,8 @@ object AAOptionsConstructor {
|
|
|
|
|
|
val aaLegend = AALegend()
|
|
val aaLegend = AALegend()
|
|
.enabled(aaChartModel.legendEnabled) //是否显示 legend
|
|
.enabled(aaChartModel.legendEnabled) //是否显示 legend
|
|
- .itemStyle(
|
|
|
|
- AAItemStyle()
|
|
|
|
- .color(aaChartModel.axesTextColor)
|
|
|
|
- )
|
|
|
|
|
|
+ .itemStyle(AAItemStyle()
|
|
|
|
+ .color(aaChartModel.axesTextColor))
|
|
|
|
|
|
val aaOptions = AAOptions()
|
|
val aaOptions = AAOptions()
|
|
.chart(aaChart)
|
|
.chart(aaChart)
|
|
@@ -209,7 +205,7 @@ object AAOptionsConstructor {
|
|
.enabled(aaXAxisLabelsEnabled) //设置 x 轴是否显示文字
|
|
.enabled(aaXAxisLabelsEnabled) //设置 x 轴是否显示文字
|
|
if (aaXAxisLabelsEnabled!!) {
|
|
if (aaXAxisLabelsEnabled!!) {
|
|
aaXAxisLabels.style(
|
|
aaXAxisLabels.style(
|
|
- AAStyle()
|
|
|
|
|
|
+ AAStyle()
|
|
.color(aaChartModel.axesTextColor)
|
|
.color(aaChartModel.axesTextColor)
|
|
)
|
|
)
|
|
}
|
|
}
|
|
@@ -227,7 +223,7 @@ object AAOptionsConstructor {
|
|
.enabled(aaChartModel.yAxisLabelsEnabled)
|
|
.enabled(aaChartModel.yAxisLabelsEnabled)
|
|
if (aaYAxisLabelsEnabled!!) {
|
|
if (aaYAxisLabelsEnabled!!) {
|
|
aaYAxisLabels.style(
|
|
aaYAxisLabels.style(
|
|
- AAStyle()
|
|
|
|
|
|
+ AAStyle()
|
|
.color(aaChartModel.axesTextColor)
|
|
.color(aaChartModel.axesTextColor)
|
|
)
|
|
)
|
|
}
|
|
}
|
|
@@ -239,11 +235,9 @@ object AAOptionsConstructor {
|
|
.allowDecimals(aaChartModel.yAxisAllowDecimals) //是否允许显示小数
|
|
.allowDecimals(aaChartModel.yAxisAllowDecimals) //是否允许显示小数
|
|
.reversed(aaChartModel.yAxisReversed)
|
|
.reversed(aaChartModel.yAxisReversed)
|
|
.gridLineWidth(aaChartModel.yAxisGridLineWidth) //y轴网格线宽度
|
|
.gridLineWidth(aaChartModel.yAxisGridLineWidth) //y轴网格线宽度
|
|
- .title(
|
|
|
|
- AATitle()
|
|
|
|
|
|
+ .title(AATitle()
|
|
.text(aaChartModel.yAxisTitle)
|
|
.text(aaChartModel.yAxisTitle)
|
|
- .style(
|
|
|
|
- AAStyle()
|
|
|
|
|
|
+ .style(AAStyle()
|
|
.color(aaChartModel.axesTextColor)
|
|
.color(aaChartModel.axesTextColor)
|
|
)
|
|
)
|
|
) //y 轴标题
|
|
) //y 轴标题
|