LightweightChartsIOS
LightweightChartsIOS copied to clipboard
EventPrice changes. Delete barPrice, and replace for priceData in 4.x.x
In version 3.8.0 you have this data structure, in which BarPrice == Double
// MARK: -
public enum EventPrices {
case barPrice(BarPrice)
case barPrices(BarPrices)
case none
}
In version 4.0.0 you change structure to this
// MARK: -
public enum EventPrices {
case barData(BarData)
case lineData(LineData)
case none
}
where
// MARK: -
public struct BarData: BarSeriesData {
public var time: Time
public var open: Double?
public var high: Double?
public var low: Double?
public var close: Double?
public var color: ChartColor?
public init(time: Time, open: Double?, high: Double?, low: Double?, close: Double?, color: ChartColor? = nil) {
self.time = time
self.open = open
self.high = high
self.low = low
self.close = close
self.color = color
}
}
How may i mapping case barPrice(BarPrice) -> case barData(BarData)?
As i see in diff of 4.x.x. case barPrice(BarPrice) is case lineData(LineData) now