diff --git a/Sources/LightweightCharts/Implementations/API/Series/SeriesApi+Extension.swift b/Sources/LightweightCharts/Implementations/API/Series/SeriesApi+Extension.swift index fdf2254..ead6028 100644 --- a/Sources/LightweightCharts/Implementations/API/Series/SeriesApi+Extension.swift +++ b/Sources/LightweightCharts/Implementations/API/Series/SeriesApi+Extension.swift @@ -25,7 +25,7 @@ public extension SeriesApi where Self: SeriesObject { } func barsInLogicalRange(range: FromToRange, completion: @escaping (BarsInfo?) -> Void) { - let script = "\(jsName).setData(\(range.jsonString));" + let script = "\(jsName).barsInLogicalRange(\(range.jsonString));" context.decodedResult(forScript: script, completion: completion) }