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/brush

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

brush event

The brush event is triggered after the brush action is dispatched.

brushEnd event (v4.5.0+)

The brushEnd event is triggered after the brushEnd action is dispatched.

brushselected event structure

The brushselected event is triggered when brush behavior is used or dispatchAction is called, but not when using setOption(). Its params object contains: type ('brushselected') and batch array. Each batch item contains: brushId (string), brushIndex (number), brushName (string), areas array with range (pixel coordinates for global areas) or coordRange/coordRanges (for coordinate system areas), and selected array (one item per series with seriesIndex and dataIndex array of selected items).

globalcursortaken event

The globalcursortaken event relates to the takeGlobalCursor action.

brushselected event usage example

Example showing how to sum selected values from multiple series using the brushselected event: chart.on('brushselected', function (params) { var brushComponent = params.batch[0]; var sum = 0; for (var sIdx = 0; sIdx < brushComponent.selected.length; sIdx++) { var dataIndices = brushComponent.selected[sIdx].dataIndex; for (var i = 0; i < dataIndices.length; i++) { var dataIndex = dataIndices[i]; sum += dataBySeries[sIdx][dataIndex]; } } console.log(sum); });

brush event throttling with throttleType

The brush.throttleType option can be used to avoid triggering brush events too frequently.

brushselected not triggered by setOption

The brushselected event is triggered by dispatchAction or brush behavior, but not when using setOption().

Give your agent this brain