Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const memoizedYColumnData = useMemo(() => {
if (position === 'stacked') {
const {lineData} = lineTransform(
table,
xColumn,
yColumn,
groupKey,
colorHexes,
position
)
return getDomainDataFromLines(lineData, DomainLabel.Y)
}
return table.getColumn(yColumn, 'number')
}, [table, yColumn, xColumn, position, colorHexes, groupKey])