romsson / d3-gridding

grids for rapid D3 charts mockups
https://romsson.github.io/d3-gridding/example/capture/display.html
BSD 3-Clause "New" or "Revised" License
104 stars 7 forks source link

Bulk parameters setting (as an alternative to individual ones) #18

Closed romsson closed 7 years ago

romsson commented 7 years ago

Add a public method to set parameters as a JSON object. E.g. as an alternative to:

d3.gridding()
  .size([width, height])
  .mode("coordinate")
  .valueX("__x")
  .valueY("__y")
  .valueWidth("__width")
  .valueHeight("__height");

do

d3.gridding()
  .params({
  "size": [width, height],
  "mode": "coordinate",
  "valueX": "__x",
  "valueY": "__y",
  "valueWidth": "__width",
  "valueHeight": "__height"
})