|
@@ -141,9 +141,9 @@ object AAOptionsConstructor {
|
|
) {
|
|
) {
|
|
val chartType = aaChartModel.chartType
|
|
val chartType = aaChartModel.chartType
|
|
|
|
|
|
- var aaDataLabels = AADataLabels()
|
|
|
|
|
|
+ val aaDataLabels = AADataLabels()
|
|
if (aaChartModel.dataLabelsEnabled == true) {
|
|
if (aaChartModel.dataLabelsEnabled == true) {
|
|
- aaDataLabels = aaDataLabels
|
|
|
|
|
|
+ aaDataLabels
|
|
.enabled(true)
|
|
.enabled(true)
|
|
.style(aaChartModel.dataLabelsStyle)
|
|
.style(aaChartModel.dataLabelsStyle)
|
|
}
|
|
}
|
|
@@ -153,7 +153,6 @@ object AAOptionsConstructor {
|
|
val aaColumn = AAColumn()
|
|
val aaColumn = AAColumn()
|
|
.borderWidth(0f)
|
|
.borderWidth(0f)
|
|
.borderRadius(aaChartModel.borderRadius)
|
|
.borderRadius(aaChartModel.borderRadius)
|
|
- .dataLabels(aaDataLabels)
|
|
|
|
if (aaChartModel.polar == true) {
|
|
if (aaChartModel.polar == true) {
|
|
aaColumn.pointPadding(0f)
|
|
aaColumn.pointPadding(0f)
|
|
.groupPadding(0.005f)
|
|
.groupPadding(0.005f)
|
|
@@ -164,17 +163,12 @@ object AAOptionsConstructor {
|
|
val aaBar = AABar()
|
|
val aaBar = AABar()
|
|
.borderWidth(0f)
|
|
.borderWidth(0f)
|
|
.borderRadius(aaChartModel.borderRadius)
|
|
.borderRadius(aaChartModel.borderRadius)
|
|
- .dataLabels(aaDataLabels)
|
|
|
|
if (aaChartModel.polar == true) {
|
|
if (aaChartModel.polar == true) {
|
|
aaBar.pointPadding(0f)
|
|
aaBar.pointPadding(0f)
|
|
.groupPadding(0.005f)
|
|
.groupPadding(0.005f)
|
|
}
|
|
}
|
|
aaPlotOptions.bar(aaBar)
|
|
aaPlotOptions.bar(aaBar)
|
|
}
|
|
}
|
|
- AAChartType.Area -> aaPlotOptions.area(AAArea().dataLabels(aaDataLabels))
|
|
|
|
- AAChartType.Areaspline -> aaPlotOptions.areaspline(AAAreaspline().dataLabels(aaDataLabels))
|
|
|
|
- AAChartType.Line -> aaPlotOptions.line(AALine().dataLabels(aaDataLabels))
|
|
|
|
- AAChartType.Spline -> aaPlotOptions.spline(AASpline().dataLabels(aaDataLabels))
|
|
|
|
AAChartType.Pie -> {
|
|
AAChartType.Pie -> {
|
|
val aaPie = AAPie()
|
|
val aaPie = AAPie()
|
|
.allowPointSelect(true)
|
|
.allowPointSelect(true)
|
|
@@ -183,24 +177,20 @@ object AAOptionsConstructor {
|
|
if (aaChartModel.dataLabelsEnabled == true) {
|
|
if (aaChartModel.dataLabelsEnabled == true) {
|
|
aaDataLabels.format("<b>{point.name}</b>: {point.percentage:.1f} %")
|
|
aaDataLabels.format("<b>{point.name}</b>: {point.percentage:.1f} %")
|
|
}
|
|
}
|
|
- aaPlotOptions.pie(aaPie.dataLabels(aaDataLabels))
|
|
|
|
|
|
+ aaPlotOptions.pie(aaPie)
|
|
}
|
|
}
|
|
AAChartType.Columnrange -> {
|
|
AAChartType.Columnrange -> {
|
|
val aaColumnrange = AAColumnrange()
|
|
val aaColumnrange = AAColumnrange()
|
|
.borderRadius(0f) //The color of the border surrounding each column or bar
|
|
.borderRadius(0f) //The color of the border surrounding each column or bar
|
|
.borderWidth(0f) //The corner radius of the border surrounding each column or bar. default:0
|
|
.borderWidth(0f) //The corner radius of the border surrounding each column or bar. default:0
|
|
- .dataLabels(aaDataLabels)
|
|
|
|
aaPlotOptions.columnrange(aaColumnrange)
|
|
aaPlotOptions.columnrange(aaColumnrange)
|
|
}
|
|
}
|
|
- AAChartType.Arearange -> {
|
|
|
|
- val aaArearange = AAArearange()
|
|
|
|
- .dataLabels(aaDataLabels)
|
|
|
|
- aaPlotOptions.arearange(aaArearange)
|
|
|
|
- }
|
|
|
|
else -> {
|
|
else -> {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+ aaPlotOptions.series?.dataLabels(aaDataLabels)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|