Skip to content

Is it possible to select a single line in a nv.models.lineChart()? #2225

@whyjay17

Description

@whyjay17

I am trying to make an onClick event using dispatch.on('elementClick' on chart.lines where chart is nv.models.lineChart()
What I did was

chart.lines.dispatch.on('elementClick', (e) => {
   console.log(e)
})

With this, when I clicked on a single line on a line chart that has multiple series (legends), it returns the information of all lines instead of the selected one. Is there a way to make this work only for the line that I selected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions