Hi There,
Same data shows different line drawing. What I am missing here ? Each time I click to see chart, its drawing is different.
Chart{
ForEach(data)
{ series in
ForEach(series.data){ entry in
LineMark(
x: .value("Day", entry.day),
y: .value("Amount", entry.amount)
) .foregroundStyle(by: .value("Doc", series.Doc))
.symbol(by: .value("Doc", series.Doc))
PointMark(
x: .value("Day", entry.day),
y: .value("Sales", entry.amount)
)
.foregroundStyle(.purple)
.symbolSize(symbolSize)
}
.lineStyle(StrokeStyle(lineWidth: lineWidth))
}
}
.chartLegend(position: .top)
.chartYScale(domain: .automatic(includesZero: false))
.chartXAxis {
AxisMarks(values: .automatic(roundLowerBound: false, roundUpperBound: false)) { value in
if value.index < value.count - 1 {
AxisValueLabel()
}
AxisTick()
AxisGridLine()
}
}