Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design spike] Namespacing config API #47

Open
jrajav opened this issue May 22, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jrajav
Copy link
Contributor

commented May 22, 2018

Spike on nesting / namespacing config parameters and breaking apart different config update methods to match.

Refer to comment #45 (comment), and some possible API examples from @biovisualize:

Config method for each sub-component

mapd3.Chart(container)
  .setBarChartConfig({...})
  .setAxesConfig({...})

Similar to event pattern:

chart1.getEvents()
  .onBrush("brushClear", callback)

Let the user compose the chart

const axis = mapd3.axis(container)
  .setConfig({})
  .onBrush(callback)
// ...
const chart = mapd3.composeChart(axis, bar, tooltip)

Simple, monolithic

mapd3.Chart(container)
  .setConfig({
    bar: {},
    axes: {}
  })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.