Relative Content

Tag Archive for swiftuicharts

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.