qlik-oss/sn-scatter-plot

View on GitHub
src/data-handler/is-binned-data.js

Summary

Maintainability
A
40 mins
Test Coverage
A
100%
export default function isBinnedData(layoutService) {
  const dataPages = layoutService.getDataPages();
  if (dataPages.length) {
    const { qMatrix, qArea } = dataPages[0];
    const { qLeft, qTop, qWidth, qHeight } = qArea;
    return dataPages.length === 1 && !qMatrix.length && !qLeft && !qTop && !qWidth && !qHeight;
  }
  return true;
}