JavaScript
var example = document.getElementById('example1');
var hot = new Handsontable(example, {
data: [
[-5, 3, -4, 6, 8, 9, -6, 7, 9],
[5, -3, -4, 6, -8, 9, 6, 7, 9],
[-5, 3, -4, 6, 8, 9, -6, 7, 9],
[5, -3, -4, 6, -8, 9, 6, 7, 9],
[-5, 3, -4, 6, 8, 9, -6, 7, 9],
[5, -3, -4, 6, -8, 9, 6, 7, 9],
[-5, 3, -4, 6, 8, 9, -6, 7, 9],
[5, -3, -4, 6, -8, 9, 6, 7, 9],
[-5, 3, -4, 6, 8, 9, -6, 7, 9],
[5, -3, -4, 6, -8, 9, 6, 7, 9],
[-5, 3, -4, 6, 8, 9, -6, 7, 9],
[5, -3, -4, 6, -8, 9, 6, 7, 9]
],
rowHeaders: true,
colHeaders: true
});
hot.updateSettings({
cells: function(row, col){
let cp = {}
if(hot.getDataAtCell(row, col) < 0){
cp.className = 'red'
}
return cp
}
})