I am wondering if canvas drawing should be used fo...
# compose
p
I am wondering if canvas drawing should be used for simple shapes if you can use Compose instead. Let’s assume I want to draw Bar Chart. This can be achieved with drawOnCanvas, but also using just Compose Boxes. Furthermore, if BarChart will be very wide and horizontally scrollable, in Compose I could use LazyRow which is not a case for Canvas. What you guys think?
a
For some very simple use cases this might work out alright, but I think once a chart like this exhibits any degree of complexity it'll become easier to implement a Chart composable with canvas drawing. I would definitely avoid using something like lazy row/column for it.
👍 1