HTML table - styling individual thousands of cells

In the process of creating html versions of the application, and one part is a table, which can contain many cells.

around: 150 columns, with ease up to 10,000 rows.

The question is performance, and what would be worthy to be able to style each cell based on the content?

therefore, each cell has a number, and the background color is filled based on the percentage in which this number is suitable.

for example: have a strip

77-100 = red
33 - 77 = blue
0 < 33 = green
0 = black

what I tried on a small table gives a class to everyone that I would like to color it. (user-modifiable colors, so the class setting should be able to change the class definition)

we get something like this:

<tr>
  <td class='percentile-100'>87.5%</td>
  <td class='percentile-77'>75.0%</td>
  <td class='percentile-0'>0.0%</td>

and in CSS set the style for the classes. only 4 styles are required.

(150 * 10 000 =) 1 500 000 , , , .

JavaScript . MB. . , , .

?

+4
1

, - . , , - , . , , . ajax , - .

, , , , , . AJAX pagination.

0

Source: https://habr.com/ru/post/1568493/


All Articles