Posts

Post not yet marked as solved
3 Replies
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.
Post not yet marked as solved
3 Replies
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.