Skip to content

[Feature] Disable emphasis state on legend hovering #19782

@ViniciusCestarii

Description

@ViniciusCestarii

What problem does this feature solve?

I'm creating a chart using echart graph and i found that i can't disable the emphasis trigered by legend hovering, resulting in some unpleasent results.

this issue can be seem in your own example: https://echarts.apache.org/examples/en/editor.html?c=graph
where hovering the legend show only some conexions when the series.emphasis.focus = 'adjacency'

legend: [
  {
    data: graph.categories.map(function (a) {
      return a.name;
    })
  }
],

series: [
  {
    name: 'Les Miserables',
    type: 'graph',
    layout: 'none',
    data: graph.nodes,
    links: graph.links,
    categories: graph.categories,
    roam: true,
    label: {
      position: 'right',
      formatter: '{b}'
    },
    lineStyle: {
      color: 'source',
      curveness: 0.3
    },
    emphasis: {
      focus: 'adjacency', 
      lineStyle: {
        width: 10
      }
    }
  }
]

What does the proposed API look like?

legend.triggerEmphasis = false (default true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishsupport

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions