File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
compose-charts/src/commonMain/kotlin/ir/ehsannarmani/compose_charts/models
document/docs/chart-properties Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ data class PopupProperties(
1919 val contentHorizontalPadding : Dp = 4 .dp,
2020 val contentVerticalPadding : Dp = 2 .dp,
2121 val mode : Mode = Mode .Normal ,
22+ @Deprecated(
23+ message = " Use contentBuilderNew instead for enhanced functionality" ,
24+ replaceWith = ReplaceWith (" contentBuilderFunction: (dataIndex: Int, valueIndex: Int, value: Double)" )
25+ )
2226 val contentBuilder : (value: Double ) -> String = {
2327 it.format(1)
2428 },
Original file line number Diff line number Diff line change 1414| ` contentHorizontalPadding ` | Dp | ` 4.dp ` | specifies popup horizontal padding |
1515| ` contentVerticalPadding ` | Dp | ` 2.dp ` | specifies popup vertical padding |
1616| ` mode ` | PopupProperties.Mode | ` Mode.Normal ` | specifies popup visibility mode ( you can pass PointMode to make popup visible just on points ) |
17- | ` contentBuilder ` | (Double)->String | ` { "%.2f".format(it) } ` | specifies popup content creation template |
17+ | ` contentBuilder ` ** (Deprecated)** | (Double)->String | ` { "%.2f".format(it) } ` | specifies popup content creation template |
18+ | ` contentBuilderFunction ` | (String, Double)->String | ` { "%.2f".format(it) } ` | specifies popup content creation template |
1819
1920!!! tip "Tip"
2021 In line charts your can set specific popup properties for each line, for example you can disable one
3233 cornerRadius = 8.dp,
3334 contentHorizontalPadding = 4.dp,
3435 contentVerticalPadding = 2.dp,
35- contentBuilder = { value->
36- " %.1f".format(value)+"Million"
36+ contentBuilderFuntion = { label, value->
37+ label + ": %.1f".format(value)+" Million"
3738 }
3839 )
3940 ```
You can’t perform that action at this time.
0 commit comments