ThomasSiegmund / D3TableFilter

A table widget based on Max Guglielmi's "HTML Table Filter Generator" and D3.js
Other
65 stars 17 forks source link

Adapting examples/interaction #28

Open jwang-lilly opened 6 years ago

jwang-lilly commented 6 years ago

Hi, I absolutely love this package and the examples are also very helpful. Thank you for the great work.

I have a quick question regarding the examples/interaction where you generate an orange circle scaled to the cell value. Well, is there a way to apply the col_2 = JS('function makeGraph(... to multiple columns? The way I do it right now is to define col_3 = JS('function makeGraph(..., col_4=JS('function makeGraphy(... Instead of duplicating the codes after col_2 =, col_3 =, col_4 = etc, I wonder how to apply the same to all the columns at one go?

Any advice is greatly appreciated.

This example generates an orange circle scaled to the cell value.

# The number is part of the svg graphic, but still allows for sorting and filtering.
  cellFunctions <- list(
  col_2 = JS('function makeGraph(selection, tbl, col){