Guest User

Untitled

a guest
Jul 12th, 2022
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   function conditionalNumeric(hot, td, row, column, prop, value, cellProperties) {
  2.     // Apply base numeric rendering
  3.     Handsontable.renderers.NumericRenderer.apply(this, arguments);
  4.  
  5.     if (row === getSummaryRows().percentUnderOverOptioned) {
  6.       if (value < 80 || value > 120) td.classList.add("spreadsheet-red-cell");
  7.       if ((value >= 80 && value <= 95) || (value >= 105 && value <= 120))
  8.         td.classList.add("spreadsheet-amber-cell");
  9.       if (value > 95 && value < 105) td.classList.add("spreadsheet-green-cell");
  10.     }
  11.   }
Advertisement
Add Comment
Please, Sign In to add comment