Post

Replies

Boosts

Views

Activity

Reply to How to change the text color for SwiftUI Chart's legend text?
I just checked, this legend label color is currently driven by secondaryLabelColor (described at developer.apple.com and referenced in the Color section of Apple's Human Interface Guidelines), so the specific color value depends on whether the theme is dark or light (except on Apple Watch). So, using content mentioned above is the way to go. However, consider that ideally there's stylistic unity across multiple charts, apps from different makers and between charts and other parts of the application. So it's a good idea to consider using the default, and file feedback if it doesn't seem sufficient, explaining what you miss in the current version, and why, and what option would fit the bill.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’22
Reply to How to change the text color for SwiftUI Chart's legend text?
It may not be the best answer, but one option is to use your own SwiftUI View in the legend, as the content can be specified:         .chartLegend(position: .bottom, alignment: .top, spacing: 16) {             Text("Invoices Payments").foregroundColor(.blue) // just an example View         } You can group each Circle / Text entry into a LegendItem view, and render a collection of two (in this case). In this case it doesn't buy too much, compared to just using SwiftUI. I'll add a better solution if I find one.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’22
Reply to How to use vibe tools in Xcode
It should be enough to restart Xcode.
Replies
Boosts
Views
Activity
Jul ’25
Reply to How to read a value when tapping a point on a Chart3D
Hi João, can you try using the .chartXSelection, .chartYSelection, .chartZSelection APIs? It's at at a beta quality at the moment just like Chart3D itself, but it may work. It detects the nearest surface on tap interaction, although currently only the "front" side (top side).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to How to change the text color for SwiftUI Chart's legend text?
I just checked, this legend label color is currently driven by secondaryLabelColor (described at developer.apple.com and referenced in the Color section of Apple's Human Interface Guidelines), so the specific color value depends on whether the theme is dark or light (except on Apple Watch). So, using content mentioned above is the way to go. However, consider that ideally there's stylistic unity across multiple charts, apps from different makers and between charts and other parts of the application. So it's a good idea to consider using the default, and file feedback if it doesn't seem sufficient, explaining what you miss in the current version, and why, and what option would fit the bill.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to How to change the text color for SwiftUI Chart's legend text?
It may not be the best answer, but one option is to use your own SwiftUI View in the legend, as the content can be specified:         .chartLegend(position: .bottom, alignment: .top, spacing: 16) {             Text("Invoices Payments").foregroundColor(.blue) // just an example View         } You can group each Circle / Text entry into a LegendItem view, and render a collection of two (in this case). In this case it doesn't buy too much, compared to just using SwiftUI. I'll add a better solution if I find one.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22