Skip to content

Each datum d selection.join key is mapped to d.fn resulting in duplicate keys for the same function #346

@mauriciopoppe

Description

@mauriciopoppe

Given this data:

data: [
  {fn: 'x'},
  {fn: 'x'},
]

Is making the following join:

function-plot/src/chart.ts

Lines 550 to 558 in 602f9eb

.data(
(d: FunctionPlotOptions) => {
return d.data
},
(d: any) => {
// The key is the function set or other value that uniquely identifies the datum.
return d.fn || d.r || d.x || d.text
}
)

Return the key x for both values even though there are two different functions.

Evaluate changing the key to be a unique id that identifies each datum instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions