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

echarts-instance/events

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.

dispatchAction method signature

dispatchAction(payload: Object) triggers chart actions like legendToggleSelect, dataZoom, showTip, etc. The payload parameter can trigger multiple actions through batch attribute. Actions and corresponding events are documented in action and events references.

on method signature and usage

on(eventName: string, handler: Function, context?: Object) or on(eventName: string, query: string|Object, handler: Function, context?: Object). Binds event-handling function. Event names are lowercase strings. Query parameter optionally filters handlers to specific components or data items. Context parameter sets the 'this' reference in callback.

on query parameter string format

Query string format: 'mainType' or 'mainType.subType', for example 'series', 'series.line', 'xAxis.category'. Filters event handlers to graphic elements of specified component types.

on query parameter object properties

Query object can include: <mainType>Index (component index, number), <mainType>Name (component name, string), <mainType>Id (component id, string), dataIndex (data item index, number), name (data item name, string), dataType (data item type like 'node' or 'edge' in graph), element (element name in custom series). For example: {seriesName: 'uuu'}, {seriesIndex: 1, name: 'xx'}, {dataType: 'node'}, {targetName: 'my_el'}.

off method signature

off(eventName?: string, handler?: Function). Unbinds event-handler function. If no eventName is provided, all listeners of all events are unbound. If no handler is provided, all listeners of the specified eventName are unbound.

Formatter params structure for series

The formatter params object passed to series formatters has the following properties: componentType ('series'), seriesType (string), seriesIndex (number), seriesName (string), name (string for data or category name), dataIndex (number), data (original data object), value (number|Array|Object, usually same as data but can differ in some series like map or radar), encode (Object with coordinate keys like 'x', 'y', 'radius', 'angle' mapping to dimension indices arrays), dimensionNames (Array<String> of dimension names), dimensionIndex (number, only for radar series), and color (string).

chart.one() API deprecated in v5

The chart.one(...) method is deprecated in v5.

Give your agent this brain