patrykandpatrick / vico

A light and extensible chart library for Android.
https://patrykandpatrick.com/vico/wiki
Apache License 2.0
2.08k stars 125 forks source link

Expose TextComponent functions which accept androidx.compose.ui.text.TextStyle #650

Closed kevincianfarini closed 1 month ago

kevincianfarini commented 5 months ago

The functions rememberTextComponent and rememberAxisLabelComponent now both accept a TextStyle that dictates the text's color, size, and font. Previously, these functions accepted three parameters for these values. This was awkward for Compose callers, particularly for the android.graphics.Typeface value.

kevincianfarini commented 5 months ago

I've pushed some edits. They:

CI won't run until you approve, so consider this a ping 😄

Gowsky commented 5 months ago

Hello @kevincianfarini, thanks for your contribution! Regarding @patrickmichalik’s comment, he meant that we shouldn't use TextStyle as a parameter. That’s because we won’t use most of its properties. Instead, we should directly accept FontFamily, FontWeight, FontStyle, and FontSynthesis.

kevincianfarini commented 5 months ago

Ah I see, I can rework that.

kevincianfarini commented 5 months ago

I'm going to have to follow up on this next week since I'm going to be out of the office. Sorry for the delay!

patrickmichalik commented 5 months ago

No worries at all, @kevincianfarini! There’s no rush here. Thanks for letting us know.

Gowsky commented 2 months ago

Ping. 😄

kevincianfarini commented 2 months ago

Hey, sorry, things have gotten extremely busy with work. I will try to get this over the finish line in the next couple of weeks, though if you'd prefer please feel free to take this over. I won't be offended.

Gowsky commented 1 month ago

No problem. Thanks for the update!

Gowsky commented 1 month ago

Closing due to inactivity.