new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Apache ECharts · all subjects

events/legend

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

legendselectchanged event

The legendselectchanged event is emitted when users toggle legend button in the legend component. It corresponds to the legendToggleSelect action. Its params object contains: type ('legendselectchanged'), name (changed legend name as string), and selected (object mapping legend names to boolean selecting states).

legendunselected event

The legendunselected event is emitted after unselecting legend via dispatchAction, not by user interaction. It corresponds to the legendUnSelect action. Its params object contains: type ('legendunselected'), name (unselected legend name as string), and selected (object mapping all legend names to boolean selecting states).

legendselectall event

The legendselectall event is emitted after all legends are selected. It corresponds to the legendAllSelect action. Its params object contains: type ('legendselectall') and selected (object mapping all legend names to boolean selecting states).

legendinverseselect event

The legendinverseselect event is emitted after inversing all legends. It corresponds to the legendInverseSelect action. Its params object contains: type ('legendinverseselect') and selected (object mapping all legend names to boolean selecting states).

legendscroll event

The legendscroll event is triggered when legend scroll occurs. It corresponds to the legendscroll action. Its params object contains: type ('legendscroll'), scrollDataIndex (number), and legendId (string).

legendselectchanged backwards compatibility note

In ECharts 2.x, the event for user switching legend was called legendselected, but this has been changed to legendselectchanged in current versions.

Legend selection event distinction

User interaction with legend triggers legendselectchanged event. Using dispatchAction to programmatically select/unselect triggers legendselected or legendunselected events instead.

legendselectchanged event for legend toggling

When a legend item is toggled, the 'legendselectchanged' event is triggered (not 'legendselected'). The event params object includes a 'selected' property which is an object mapping legend names to their selection status (true/false).

Give your agent this brain