KoalaPlot / koalaplot-core

Koala Plot is a Compose Multiplatform based charting and plotting library written in Kotlin
https://koalaplot.github.io/
MIT License
317 stars 14 forks source link

Style `xAxisTitle` and `yAxisTitle` on the XYGraph #68

Open joelkanyi opened 6 days ago

joelkanyi commented 6 days ago

First of all, thank you for this awesome Kotlin Multiplatform library.

Currently, I can only pass the String title, but I don't have the capability to style the text to my liking.

It would be nice if xAxisTitle and yAxisTitle could be content slots so that I can pass whatever I want, e.g.,

public fun <X, Y> XYGraph(
    ...
    xAxisTitle: @Composable (() -> Unit)? = null,
    ...
    yAxisTitle: @Composable (() -> Unit)? = null,
    ...
) {
    ...
}    
gsteckman commented 6 days ago

There is an overloaded version of XYGraph that lets you do that. Around line 69 in XYGraph.kt.