I’m trying to understand the swiftUI Charts API specifically overlaying charts and modifying certain aspects of the chart
I just started working with Charts in swiftui and I’m struggling. I’d like to overlay my bar chart in the image below with a line chart. But the only way I can figure out how is to embed in a ZStack, but as shown in the screenshot the two charts(same data passed for now) don’t align. I’d like to show maybe an average line overlaying the bars, but I just can’t figure it out. I don’t know much about charting and I’m new to this API as well. Also I’d like to display the actual amount on the bar or above the bar or something. Not sure if any of this is possible in swiftui yet. If nothing else can you point me to some good documentation or additional info on Charts? Thanks
I’m trying to understand the swiftUI Charts API specifically overlaying charts and modifying certain aspects of the chart
I just started working with Charts in swiftui and I’m struggling. I’d like to overlay my bar chart in the image below with a line chart. But the only way I can figure out how is to embed in a ZStack, but as shown in the screenshot the two charts(same data passed for now) don’t align. I’d like to show maybe an average line overlaying the bars, but I just can’t figure it out. I don’t know much about charting and I’m new to this API as well. Also I’d like to display the actual amount on the bar or above the bar or something. Not sure if any of this is possible in swiftui yet. If nothing else can you point me to some good documentation or additional info on Charts? Thanks
I’m trying to understand the swiftUI Charts API specifically overlaying charts and modifying certain aspects of the chart
I just started working with Charts in swiftui and I’m struggling. I’d like to overlay my bar chart in the image below with a line chart. But the only way I can figure out how is to embed in a ZStack, but as shown in the screenshot the two charts(same data passed for now) don’t align. I’d like to show maybe an average line overlaying the bars, but I just can’t figure it out. I don’t know much about charting and I’m new to this API as well. Also I’d like to display the actual amount on the bar or above the bar or something. Not sure if any of this is possible in swiftui yet. If nothing else can you point me to some good documentation or additional info on Charts? Thanks
How to show multiple lines on same chart in swift and chart framework
I’m testing charts framework usage, but i cannot understand how to show two values from same origin in the same chart. Here I built a fake example of a blood pressure app, where I would like to show in the same chart BOTH data of Systolic and Diastolic pressure. I tried different “forEach” but cannot understand how to correct two issues.
AxisValueLabel with orientation vertical/verticalReversed is not working with padding SwiftUI Charts
I am trying to apply padding on AxisValueLabel
Text
with orientation: .verticalReversed
but it’s not working properly. Result is showing with stretched value.
collisionResolution truncate is not working for AxisValueLabel in Charts framework SwiftUI
I tried collisionResolution as truncate in AxisValueLabel. As documented in apple, Truncate a label to the space available to it but it’s not working.
Not able to get action on tap of bar and X axis label in Swift Charts in SwiftUI
I can draw a bar chart using Swift Charts framework.
Now I want to perform 2 actions in below bar chart.