Using JavaScript Tabulator, I would like to create a custom CSS Tabulator formatter to generate centered bar chart shifting left/right dependent on the sign of the cell value with varying colors, again, dependent on the sign (see the image below). My idea is to create a custom formatting function that would change the underlying CSS. The thing is that to scale the bars, I will need the maximum/minimum value of the column. In case when the data is grouped, I would need the min/max of the group in order to scale according to the group min/max rather than the global one. Is it possible to access the group min/max in the formatting function? Alternatively, is it possible to pass the column min/max as a parameter? Here is an observablehq implementation of the formatting that I would like to have.
from JavaScript Tabulator: custom CSS formatter to generate centered bar chart shifting left/right dependent on sign with varying colors dependent on sign?

No comments:
Post a Comment