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

Create a good way to send Margin or Tooltip #3

Open
camilosampedro opened this issue Mar 16, 2017 · 0 comments
Open

Create a good way to send Margin or Tooltip #3

camilosampedro opened this issue Mar 16, 2017 · 0 comments

Comments

@camilosampedro
Copy link
Owner

Types like Margin or Offset are interfaces in Typescript's NvD3 facade to allow codes like:

chart.margin({
    // With optional left or right for example
    top: 30,
    bottom: 30
})

One thing I have thought to implement is named parameters with default values:

def margin(left: Int = 0, right: Int = 0, up: Int = 0, bottom: Int = 0): this.type

The problem is that this methods are overloaded with a parameter-less method that returns the actual value of that property:

def margin/*()*/: Margin

Let's find a way to create an easy way to bind and implement this functionality, and at the end methods like margin receive this objects with optional values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant