LightweightChartsIOS icon indicating copy to clipboard operation
LightweightChartsIOS copied to clipboard

EventPrice changes. Delete barPrice, and replace for priceData in 4.x.x

Open pnzr00t opened this issue 1 year ago • 1 comments

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)?

pnzr00t avatar Apr 17 '24 10:04 pnzr00t

Screenshot 2024-04-19 at 09 54 57

As i see in diff of 4.x.x. case barPrice(BarPrice) is case lineData(LineData) now

pnzr00t avatar Apr 19 '24 06:04 pnzr00t