Skip to content

Commit becd496

Browse files
committed
clipRect to chart area, allow min/max values to be outside of rect, adjust inset calculation to avoid crash on screen orientation change
change `clipRect` to just on the paths, avoids clipping dots on the boundary, cleanup refactor `Bounds` and `InsetPad` into utilities, add handling of label rotation update `PhoneSample` with label rotation fix imports
1 parent 968e96a commit becd496

4 files changed

Lines changed: 329 additions & 191 deletions

File tree

app/src/commonMain/kotlin/ir/ehsannarmani/compose_charts/ui/PhoneSample.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import ir.ehsannarmani.compose_charts.models.AnimationMode
1818
import ir.ehsannarmani.compose_charts.models.DotProperties
1919
import ir.ehsannarmani.compose_charts.models.HorizontalIndicatorProperties
2020
import ir.ehsannarmani.compose_charts.models.IndicatorPosition
21+
import ir.ehsannarmani.compose_charts.models.LabelProperties
2122
import ir.ehsannarmani.compose_charts.models.Line
2223
import ir.ehsannarmani.compose_charts.models.PopupProperties
2324

@@ -70,6 +71,10 @@ fun PhoneSample() {
7071
indicatorProperties = HorizontalIndicatorProperties(
7172
indicators = (0..7).map { it.toDouble() } + listOf(5.5),
7273
position = IndicatorPosition.Horizontal.End
74+
),
75+
labelProperties = LabelProperties(
76+
enabled = true,
77+
labels = "these labels will rotate".split(' '),
7378
)
7479
)
7580
}

0 commit comments

Comments
 (0)