11# Indicator Properties
22
33!!! info "Usage"
4- In every chart you can set properties of counters next to the chart
4+ In every chart you can set properties of counters next to the chart
55
66| Property | Type | Default | Description |
77| ------------------| --------------------| --------------------------------| ------------------------------------------------------------------------------------------------------------------|
@@ -13,19 +13,18 @@ In every chart you can set properties of counters next to the chart
1313| ` contentBuilder ` | (Double) -> String | ` { "%.2f".format(it) } ` | specifies counter content creation template |
1414
1515!!! Example
16- === "Line & Column Chart"
17- ``` kotlin linenums="1"
18- val indicatorProperties = HorizontalIndicatorProperties (
19- enabled = true ,
20- textStyle = MaterialTheme .typography.labelSmall,
21- count = IndicatorCount .CountBased (count = 5 ),
22- position = IndicatorPosition .Horizontal .End ,
23- padding = 32 .dp,
24- contentBuilder = { indicator ->
25- " %.2f" .format(indicator) + " Million"
26- }
27- )
28-
16+ === "Line & Column Chart"
17+ ```kotlin linenums="1"
18+ val indicatorProperties = HorizontalIndicatorProperties(
19+ enabled = true,
20+ textStyle = MaterialTheme.typography.labelSmall,
21+ count = IndicatorCount.CountBased(count = 5),
22+ position = IndicatorPosition.Horizontal.End,
23+ padding = 32.dp,
24+ contentBuilder = { indicator ->
25+ "%.2f".format(indicator) + " Million"
26+ }
27+ )
2928 ```
3029 === "Row Chart"
3130 ```kotlin linenums="1"
@@ -46,10 +45,10 @@ contentBuilder = { indicator ->
4645### Indicators Bases
4746
4847!!! tip "You can specify type of indicator counts, we have two type: CountBased, StepBased"
49- - < strong> `CountBased `< / strong> : it will receive a count number and will divide & calculate and in
50- the end it will show the requested count
51- of indicators.
52-
48+ - <strong >` CountBased ` </strong >: it will receive a count number and will divide & calculate and in
49+ the end it will show the requested count
50+ of indicators.
51+
5352 - <strong >` StepBased ` </strong >: it will receive a stepBy value and will split step by given value until it reach min value, for example
5453 if (max value = 20, min value = -10) and stepBy value is 5, the indicators will be: 20,15,10,5,0,-5,-10
5554
0 commit comments