Skip to content

[Feature] Disconnect Toolbox from echarts.connect #21679

Description

@Maxdeboer9

What problem does this feature solve?

Right now I have connected a few of my charts using echarts.connect (docs)

However, it also connects the toolbox from all the charts, so when using the magicType or saveAsImage feature, it will do these actions on all the connected charts. This will generate images of all the plots, instead of only the plot in question.

toolbox: {
    show: true,
    orient: 'vertical',
    left: 'right',
    top: 'center',
    feature: {
      mark: { show: true },
      dataView: { show: true, readOnly: false },
      magicType: { show: true, type: ['line', 'bar', 'stack'] },
      restore: { show: true },
      saveAsImage: { show: true }
    }
  },

The dataView does only display the data for the correct plot.

Image

What does the proposed API look like?

An solution would be to have an extra parameter in toolbox like this:

toolbox: {
    show: true,
    orient: 'vertical',
    left: 'right',
    top: 'center',
    feature: {
      mark: { show: true },
      dataView: { show: true, readOnly: false },
      magicType: { show: true, type: ['line', 'bar', 'stack'] },
      restore: { show: true },
      saveAsImage: { show: true }
    },
    connect: false
  },

Where connect would default to false

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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