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

actions/axis

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

axisPointer global configuration

axisPointer is a global configuration object for axis pointer behavior in ECharts.

axisPointer link array links axes together

The link property is an array where each item represents a link group. Axes that are referenced in the same link group are synchronized and move together. Axes are linked according to the axisPointer value.

axisPointer link group syntax

Each link group in the link array can reference axes using these approaches: someAxisIndex (can be an array, a single value, or 'all'), someAxisName (can be an array, a single value, or 'all'), and someAxisId (can be an array, a single value, or 'all'). The 'some' represents the dimension name of an axis: 'x', 'y', 'radius', 'angle', or 'single'.

axisPointer link example with multiple axes

Example of linking axes in a link group: link: [{ xAxisIndex: [0, 3, 4], yAxisName: 'someName' }, { xAxisId: ['aa', 'cc'], angleAxis: 'all' }]

axisPointer link mapper function converts between different axis types

When linking axes with different types (for example, 'category' and 'time'), a mapper conversion function can be provided in the link group. The mapper function converts values from a source axis to a target axis.

axisPointer link mapper function signature and parameters

The mapper function signature is: mapper(sourceVal, sourceAxisInfo, targetAxisInfo). sourceVal is a number representing the source value. sourceAxisInfo is an object including {axisDim, axisId, axisName, axisIndex, ...}. targetAxisInfo is an object including {axisDim, axisId, axisName, axisIndex, ...}. The function returns a number representing the converted value.

axisPointer link mapper example category to time conversion

Example mapper function converting between category and time axes: link: [{ xAxisIndex: [0, 1], yAxisName: ['yy'], mapper: function (sourceVal, sourceAxisInfo, targetAxisInfo) { if (sourceAxisInfo.axisName === 'yy') { return echarts.time.format('yyyy-MM-dd', sourceVal); } else if (targetAxisInfo.axisName === 'yy') { return echarts.time.parse(dates[sourceVal]); } else { return sourceVal; } } }]

axisPointer triggerOn option default value

The triggerOn option of axisPointer controls when the tooltip is triggered. The default value is 'mousemove|click'.

axisPointer triggerOn options

The triggerOn option accepts these string values: 'mousemove' (trigger when mouse moves), 'click' (trigger when mouse clicks), 'mousemove|click' (trigger when mouse clicks and moves), 'none' (do not trigger by mousemove and click).

Radar axis naming options changed in v5

In v5, radar deprecated options: radar.name → radar.axisName, radar.nameGap → radar.axisNameGap.

Time axis enhancements in ECharts 5

Apache ECharts 5 brings a time axis suitable for expressing timestamp scales. The time axis is no longer split absolutely evenly, but instead selects more meaningful points like year, month, day, and whole point to display, and can show different levels of scales at the same time. The formatter of labels supports templates for time (e.g. {yyyy}-{MM}-{dd}), and different formatters can be specified for labels with different time granularity.

expandAxisBreak action - expand axis break items

The expandAxisBreak action (v6.0.0+) expands one or more existing axis break items. Cannot create new axis breaks. Parameters: xAxisIndex ('all' | number), xAxisId (string | number), xAxisName (string), yAxisIndex ('all' | number), yAxisId (string | number), yAxisName (string), singleAxisIndex ('all' | number), singleAxisId (string | number), singleAxisName (number); and breaks object with start (string | number | Date) and end (string | number | Date). Triggers axisbreakchanged event.

collapseAxisBreak action - collapse axis break items

The collapseAxisBreak action (v6.0.0+) collapses one or more existing axis break items. Cannot create new axis breaks. Parameters: xAxisIndex ('all' | number), xAxisId (string | number), xAxisName (string), yAxisIndex ('all' | number), yAxisId (string | number), yAxisName (string), singleAxisIndex ('all' | number), singleAxisId (string | number), singleAxisName (number); and breaks object with start (string | number | Date) and end (string | number | Date). Triggers axisbreakchanged event.

toggleAxisBreak action - toggle axis break state

The toggleAxisBreak action (v6.0.0+) toggles (expand/collapse) one or more existing axis break items. Cannot create new axis breaks. Parameters: xAxisIndex ('all' | number), xAxisId (string | number), xAxisName (string), yAxisIndex ('all' | number), yAxisId (string | number), yAxisName (string), singleAxisIndex ('all' | number), singleAxisId (string | number), singleAxisName (number); and breaks object with start (string | number | Date) and end (string | number | Date). Triggers axisbreakchanged event.

Give your agent this brain