Webcharts icon indicating copy to clipboard operation
Webcharts copied to clipboard

Allow a single control input to change multiple config properties.

Open jwildfire opened this issue 8 years ago • 3 comments

Something like this? { type: "dropdown", options: ["x.column","marks[0].per[0]"], label: "Group by", values: ["Sector", "PrimaryFunction", "year", "Title"], require: true },

jwildfire avatar Apr 14 '16 19:04 jwildfire

Right now you have to do something gross like this:

myChart.on("layout",function(){
    var chart=this;
    this.controls.wrap
    .select(".control-group").select("select")
    .on("change",function(){
      var value = d3.select(this).property("value");
      chart.config.marks[0].per[0]=value
      chart.config.x.column=value
      chart.draw()
    })
})

jwildfire avatar Apr 14 '16 19:04 jwildfire

this is actually already implemented (but undocumented) for control.type: 'dropdown'; should be easy to allow other control types to do the same.

nbryant avatar May 06 '16 14:05 nbryant

Update the wiki and implement this for all other control types except for subsetter.

emmorris avatar May 03 '17 20:05 emmorris