addOHLC method

void addOHLC(
  1. dynamic series,
  2. dynamic time,
  3. double open,
  4. double high,
  5. double lower,
  6. double close, {
  7. int? timeTolerance,
  8. dynamic preserveTimeOfOverwrittenValue,
})

Implementation

void addOHLC(dynamic series, dynamic time, double open, double high,
    double lower, double close,
    {int? timeTolerance, preserveTimeOfOverwrittenValue}) {
  var dateTime = parseDateTime(time)!;

  preserveTimeOfOverwrittenValue ??= false;

  var args = [
    chartObject,
    series,
    JsObject.jsify({
      't': dateTime.millisecondsSinceEpoch,
      'o': open,
      'h': high,
      'l': lower,
      'c': close
    }),
    timeTolerance,
    preserveTimeOfOverwrittenValue
  ];

  ChartEngineChartJS._jsWrapper!.callMethod('addData_tohlc', args);
}