Post

Replies

Boosts

Views

Activity

Reply to Changing the Timeframe of Charts
From the Q&A in the lounge, it sounds like if you want to filter data, you want to do that before passing it to the Chart. So if you want to show just the past wee, you would filter those points out of your data and then include them in the chart. Additionally, you can use .chartXScale(range:) to manually specify the visible range of data.
Jun ’22
Reply to How do you manually set a range on a chart
I found a workaround by adding a hidden vertical RuleMark for the beginning and end of the day. Not sure if this is a good idea but it does seem to work well. RuleMark(x: .value("Start of day", period.start)) .foregroundStyle(Color.clear) RuleMark(x: .value("End of day", period.end)) .foregroundStyle(Color.clear)
Jun ’22