rememberConditionalLayer
fun rememberConditionalLayer(hasData: Boolean, lineProvider: LineCartesianLayer.LineProvider, verticalAxisPosition: Axis.Position.Vertical, rangeProvider: CartesianLayerRangeProvider? = null): LineCartesianLayer?(source)
Creates a LineCartesianLayer only when hasData is true, returning null otherwise.
Extracts the repeated if (data.isNotEmpty()) rememberLineCartesianLayer(...) else null pattern used in every metric chart composable.