Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Create a good way to send Margin or Tooltip #3

@camilosampedro

Description

@camilosampedro

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions