arty-charty/util.js
function getMinMaxValuesCandlestick(arr) {
    let maxValue = Number.MIN_VALUE;
    let minValue = Number.MAX_VALUE;
    arr
      .forEach((d) => {
        if (d.high > maxValue) {
          maxValue = d.high;
        }
        if (d.low < minValue) {
          minValue = d.low;
        }
      });
      return {maxValue, minValue};
  }
function getMinMaxValuesCandlestick(arr) {
    let maxValue = Number.MIN_VALUE;
    let minValue = Number.MAX_VALUE;
    arr
      .forEach((d) => {
        if (d.high > maxValue) {
          maxValue = d.high;
        }
        if (d.low < minValue) {
          minValue = d.low;
        }
      });
      return {maxValue, minValue};
  }
function getMinMaxValuesCandlestick ( arr ) { let maxValue = Number . MIN_VALUE ; let minValue = Number . MAX_VALUE ; arr . forEach ( ( d ) => { if ( d . high > maxValue ) { maxValue = d . high ; } if ( d . low < minValue ) { minValue = d . low ; } } ) ; return { maxValue , minValue } ; }
Find minimum and maximum value in an array of candlestick objects
Find minimum and maximum value in an array of candlestick objects