I've got this very simple chart, nothing fancy - just takes up stock indicator prices and shows them.
VStack {
Chart {
ForEach(viewmodel.chartData1) { chartData in
LineMark(x: .value("date", chartData.date),
y: .value("amount", chartData.close))
.interpolationMethod(.catmullRom)
AreaMark(x: .value("date", chartData.date),
y: .value("amount", chartData.close))
.interpolationMethod(.catmullRom)
}
}
.animation(.easeIn, value: viewmodel.chartData1.count)
.frame(height: 300)
.chartYScale(domain: viewmodel.range.0...viewmodel.range.1)
Spacer()
}
.padding(.horizontal, 16)
.task { await viewmodel.getSymbols() }
If I comment out the AreaMarks - the LineMark will look as I expect:
But, when adding the area it breaks:
Any ideas what did I missed here?