code
stringlengths
28
313k
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
74
language
stringclasses
1 value
repo
stringlengths
5
60
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function createAxisLabels(axis) { // Only ordinal scale support tick interval return axis.type === 'category' ? makeCategoryLabels(axis) : makeRealNumberLabels(axis); }
Calculate interval for category axis ticks and labels. To get precise result, at least one of `getRotate` and `isHorizontal` should be implemented in axis.
createAxisLabels
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function fetchAutoCategoryIntervalCalculationParams(axis) { var labelModel = axis.getLabelModel(); return { axisRotate: axis.getRotate ? axis.getRotate() : (axis.isHorizontal && !axis.isHorizontal()) ? 90 : 0, labelRotate: labelModel.get('rotate') ...
Get precision used for formatting @param {Array.<number>} [dataExtent] @return {number}
fetchAutoCategoryIntervalCalculationParams
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function addItem(tVal) { result.push(onlyTick ? tVal : { formattedLabel: labelFormatter(tVal), rawLabel: ordinalScale.getLabel(tVal), tickValue: tVal } ); }
Convert pixel point to data in axis @param {Array.<number>} point @param {boolean} clamp @return {number} data
addItem
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function makeLabelsByCustomizedCategoryInterval(axis, categoryInterval, onlyTick) { var ordinalScale = axis.scale; var labelFormatter = makeLabelFormatter(axis); var result = []; each$1(ordinalScale.getTicks(), function (tickValue) { var rawLabel = ordinalScale.getLabel(tickValue); if (...
Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`, `axis.getTicksCoords` considers `onBand`, which is used by `boundaryGap:true` of category axis and splitLine and splitArea. @param {Object} [opt] @param {Model} [opt.tickModel=axis.model.getModel('axisTick')] @param {boolean} [opt.clamp] If `true`, t...
makeLabelsByCustomizedCategoryInterval
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
Axis = function (dim, scale, extent) { /** * Axis dimension. Such as 'x', 'y', 'z', 'angle', 'radius'. * @type {string} */ this.dim = dim; /** * Axis scale * @type {module:echarts/coord/scale/*} */ this.scale = scale; /** * @type {Array.<number>} * @private...
@return {Array.<Object>} [{ formattedLabel: string, rawLabel: axis.scale.getLabel(tickValue) tickValue: number }, ...]
Axis
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function fixExtentWithBands(extent, nTick) { var size = extent[1] - extent[0]; var len = nTick; var margin = size / len / 2; extent[0] += margin; extent[1] -= margin; }
Do not mount those modules on 'src/echarts' for better tree shaking.
fixExtentWithBands
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function getDefaultLabel(data, dataIndex) { var labelDims = data.mapDimension('defaultedLabel', true); var len = labelDims.length; // Simple optimization (in lots of cases, label dims length is 1) if (len === 1) { return retrieveRawValue(data, dataIndex, labelDims[0]); } else if (len) {...
Update symbol properties @param {module:echarts/data/List} data @param {number} idx @param {Object} [seriesScope] @param {Object} [seriesScope.itemStyle] @param {Object} [seriesScope.hoverItemStyle] @param {Object} [seriesScope.symbolRotate] @param {Object} [seriesScope.symbolOffset] @param {module:echarts/model/Model}...
getDefaultLabel
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function SymbolClz$1(data, idx, seriesScope) { Group.call(this); this.updateData(data, idx, seriesScope); }
@param {module:echarts/data/List} data @param {number} idx @param {Array.<number>} symbolSize @param {Object} [seriesScope]
SymbolClz$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function getLabelDefaultText(idx, opt) { return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx); }
Update symbols draw by new data @param {module:echarts/data/List} data @param {Object} [opt] Or isIgnore @param {Function} [opt.isIgnore] @param {Object} [opt.clipShape]
getLabelDefaultText
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function updateIncrementalAndHover(el) { if (!el.isGroup) { el.incremental = el.useHoverLayer = true; } }
@param {Object} coordSys @param {module:echarts/data/List} data @param {string} valueOrigin lineSeries.option.areaStyle.origin
updateIncrementalAndHover
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function isPointNull(p) { return isNaN(p[0]) || isNaN(p[1]); }
Draw smoothed line in non-monotone, in may cause undesired curve in extreme situations. This should be used when points are non-monotone neither in x or y dimension.
isPointNull
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function createGridClipPath(cartesian, hasAnimation, seriesModel) { var rect = cartesian.getArea(); var isHorizontal = cartesian.getBaseAxis().isHorizontal(); var x = rect.x; var y = rect.y; var width = rect.width; var height = rect.height; var lineWidth = seriesModel.get('lineStyle.width'...
@param {module:echarts/coord/cartesian/Cartesian2D|module:echarts/coord/polar/Polar} coordSys @param {module:echarts/data/List} data @param {Object} dataCoordInfo @param {Array.<Array.<number>>} points
createGridClipPath
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
indexSampler = function (frame, value) { return Math.round(frame.length / 2); }
Convert coord in nd space to data @param {Array.<number>|Object.<string, number>} val @return {Array.<number>|Object.<string, number>}
indexSampler
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function dimAxisMapper(dim) { return this._axes[dim]; }
@param {Array.<number>} point @param {Array.<number>} out @return {Array.<number>}
dimAxisMapper
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function Cartesian2D(name) { Cartesian.call(this, name); }
Implemented in <module:echarts/coord/cartesian/Grid>. @return {Array.<module:echarts/coord/cartesian/Axis2D>} If not on zero of other axis, return null/undefined. If no axes, return an empty array.
Cartesian2D
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
Axis2D = function (dim, scale, coordExtent, axisType, position) { Axis.call(this, dim, scale, coordExtent); /** * Axis type * - 'category' * - 'value' * - 'time' * - 'log' * @type {string} */ this.type = axisType || 'value'; /** * Axis position * - 'top...
Transform global coord to local coord, i.e. var globalCoord = axis.toLocalCoord(40); designate by module:echarts/coord/cartesian/Grid. @type {Function}
Axis2D
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function getAxisType(axisDim, option) { // Default axis with data is category axis return option.type || (option.data ? 'category' : 'value'); }
@type {Array.<module:echarts/coord/cartesian/Axis2D>} @private
getAxisType
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function isAxisUsedInTheGrid(axisModel, gridModel, ecModel) { return axisModel.getCoordSysModel() === gridModel; }
@param {string} axisType @param {number} [axisIndex]
isAxisUsedInTheGrid
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function Grid(gridModel, ecModel, api) { /** * @type {Object.<string, module:echarts/coord/cartesian/Cartesian2D>} * @private */ this._coordsMap = {}; /** * @type {Array.<module:echarts/coord/cartesian/Cartesian>} * @private */ this._coordsList = []; /** * @type ...
@return {Array.<module:echarts/coord/Axis>}
Grid
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function endTextLayout(opt, textPosition, textRotate, extent) { var rotationDiff = remRadian(textRotate - opt.rotation); var textAlign; var textVerticalAlign; var inverse = extent[0] > extent[1]; var onLeft = (textPosition === 'start' && !inverse) || (textPosition !== 'start' && inverse); ...
@public @static @param {Object} opt @param {number} axisRotation in radian @param {number} textRotation in radian @param {number} direction @return {Object} { rotation, // according to axis textAlign, textVerticalAlign }
endTextLayout
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function getAxisInfo(axisModel) { var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo; return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)]; }
Can only be called after coordinate system creation stage. (Can be called before coordinate system update stage). @param {Object} opt {labelInside} @return {Object} { position, rotation, labelDirection, labelOffset, tickDirection, labelRotate, z2 }
getAxisInfo
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function setLabel( normalStyle, hoverStyle, itemModel, color, seriesModel, dataIndex, labelPositionOutside ) { var labelModel = itemModel.getModel('label'); var hoverLabelModel = itemModel.getModel('emphasis.label'); setLabelStyle( normalStyle, hoverStyle, labelModel, hoverLabelModel, {...
Sausage: similar to sector, but have half circle on both sides @public
setLabel
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function setLargeStyle(el, seriesModel, data) { var borderColor = data.getVisual('borderColor') || data.getVisual('color'); var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(['color', 'borderColor']); el.useStyle(itemStyle); el.style.fill = null; el.style.stroke = borderColor; el.s...
[Usage]: (1) createListSimply(seriesModel, ['value']); (2) createListSimply(seriesModel, { coordDimensions: ['value'], dimensionsCount: 5 }); @param {module:echarts/model/Series} seriesModel @param {Object|Array.<string|Object>} opt opt or coordDimensions The options in opt, see `echarts/data/helper/cre...
setLargeStyle
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function setLargeBackgroundStyle(el, backgroundModel, data) { var borderColor = backgroundModel.get('borderColor') || backgroundModel.get('color'); var itemStyle = backgroundModel.getItemStyle(['color', 'borderColor']); el.useStyle(itemStyle); el.style.fill = null; el.style.stroke = borderColor; ...
Data selectable mixin for chart series. To eanble data select, option of series must have `selectedMode`. And each data item will use `selected` to toggle itself selected status
setLargeBackgroundStyle
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function createBackgroundShape(isHorizontalOrRadial, layout, coord) { var coordLayout; var isPolar = coord.type === 'polar'; if (isPolar) { coordLayout = coord.getArea(); } else { coordLayout = coord.grid.getRect(); } if (isPolar) { return { cx: coordLayo...
@param {Array.<Object>} targetList [{name, value, selected}, ...] If targetList is an array, it should like [{name: ..., value: ...}, ...]. If targetList is a "List", it must have coordDim: 'value' dimension and name.
createBackgroundShape
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function createBackgroundEl(coord, isHorizontalOrRadial, layout) { var ElementClz = coord.type === 'polar' ? Sector : Rect; return new ElementClz({ shape: createBackgroundShape(isHorizontalOrRadial, layout, coord), silent: true, z2: 0 }); }
Either name or id should be passed as input here. If both of them are defined, id is used. @param {string|undefined} name name of data @param {number|undefined} id dataIndex of data
createBackgroundEl
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
createListSimply = function (seriesModel, opt, nameList) { opt = isArray(opt) && {coordDimensions: opt} || extend({}, opt); var source = seriesModel.getSource(); var dimensionsInfo = createDimensions(source, opt); var list = new List(dimensionsInfo, seriesModel); list.initData(source, nameList); ...
LegendVisualProvider is an bridge that pick encoded color from data and provide to the legend component. @param {Function} getDataWithEncodedVisual Function to get data after filtered. It stores all the encoding info @param {Function} getRawData Function to get raw data before filtered.
createListSimply
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function LargeSymbolDraw() { this.group = new Group(); }
Update symbols draw by new data @param {module:echarts/data/List} data @param {Object} opt @param {Object} [opt.clipShape]
LargeSymbolDraw
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function initGlobalListeners(zr, api) { if (inner$8(zr).initialized) { return; } inner$8(zr).initialized = true; useHandler('click', curry(doEnter, 'click')); useHandler('mousemove', curry(doEnter, 'mousemove')); // useHandler('mouseout', onLeave); useHandler('globalout', onLeave);...
In px, arbitrary value. Do not set too small, no animation is ok for most cases. @protected
initGlobalListeners
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function updateProps$1(animationModel, moveAnimation, el, props) { // Animation optimize. if (!propsEqual(inner$9(el).lastProp, props)) { inner$9(el).lastProp = props; moveAnimation ? updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props)); } }
@param {number} value @param {module:echarts/coord/Axis} axis @param {module:echarts/model/Global} ecModel @param {Object} opt @param {Array.<Object>} seriesDataIndices @param {number|string} opt.precision 'auto' or a number @param {string|Function} opt.formatter label formatter
updateProps$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function updateLabelShowHide(labelEl, axisPointerModel) { labelEl[axisPointerModel.get('label.show') ? 'show' : 'hide'](); }
@param {module:echarts/coord/Axis} axis @param {number} value @param {Object} layoutInfo { rotation, position, labelOffset, labelDirection, labelMargin }
updateLabelShowHide
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function TooltipRichContent(api) { this._zr = api.getZr(); this._show = false; /** * @private */ this._hideTimeout; }
Should be cleaned when render. @private @type {Array.<Array.<Object>>}
TooltipRichContent
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function buildTooltipModel(modelCascade) { var resultModel = modelCascade.pop(); while (modelCascade.length) { var tooltipOpt = modelCascade.pop(); if (tooltipOpt) { if (Model.isInstance(tooltipOpt)) { tooltipOpt = tooltipOpt.get('tooltip', true); } ...
@action @property {string} type @property {number} seriesIndex @property {number} dataIndex @property {number} [x] @property {number} [y]
buildTooltipModel
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function legendSelectActionHandler(methodName, payload, ecModel) { var selectedMap = {}; var isToggleSelect = methodName === 'toggleSelected'; var isSelected; // Update all legend components ecModel.eachComponent('legend', function (legendModel) { if (isToggleSelect && isSelected != null) { ...
If first rendering, `contentGroup.position` is [0, 0], which does not make sense and may cause unexepcted animation if adopted. @private @type {boolean}
legendSelectActionHandler
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function markerTypeCalculatorWithExtent( mlType, data, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex ) { var coordArr = []; var stacked = isDimensionStacked(data, targetDataDim /*, otherDataDim*/); var calcDataDim = stacked ? data.getCalculationInfo('stackResultDimension') ...
Markline grouped by series @private @type {module:zrender/core/util.HashMap}
markerTypeCalculatorWithExtent
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function dimValueGetter(item, dimName, dataIndex, dimIndex) { // x, y, radius, angle if (dimIndex < 2) { return item.coord && item.coord[dimIndex]; } return item.value; }
@inner @param {module:echarts/coord/*} [coordSys] @param {module:echarts/model/Series} seriesModel @param {module:echarts/model/Model} mpModel
dimValueGetter
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function createList$3(coordSys, seriesModel, maModel) { var coordDimsInfos; var areaData; var dims = ['x0', 'y0', 'x1', 'y1']; if (coordSys) { coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) { var data = seriesModel.getData(); var info = data.ge...
If tow dataZoomModels has the same axis controlled, we say that they are 'linked'. dataZoomModels and 'links' make up one or more graphics. This function finds the graphic where the source dataZoomModel is in. @public @param {Function} forEachNode Node iterator. @param {Function} forEachEdgeType edgeType iterator @par...
createList$3
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function isCoordSupported(coordType) { return indexOf(COORDS, coordType) >= 0; }
Calculate slider move result. Usage: (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`. (2) If handle0 is forbidden to cross handle1, set minSpan as `0`. @param {number} delta Move length. @param {Array.<number>} handleEnds ...
isCoordSupported
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function createLinkedNodesFinder(forEachNode, forEachEdgeType, edgeIdGetter) { return function (sourceNode) { var result = { nodes: [], records: {} // key: edgeType.name, value: Object (key: edge id, value: boolean). }; forEachEdgeType(function (edgeType) { ...
{minSpan, maxSpan, minValueSpan, maxValueSpan} @private @type {Object}
createLinkedNodesFinder
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function processSingleNode(node) { if (!isNodeAbsorded(node, result) && isLinked(node, result)) { absorb(node, result); existsLink = true; } }
Whether the axisProxy is hosted by dataZoomModel. @public @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel @return {boolean}
processSingleNode
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function isNodeAbsorded(node, result) { return indexOf(result.nodes, node) >= 0; }
@return {Array.<number>} Value can only be NaN or finite value.
isNodeAbsorded
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function absorb(node, result) { result.nodes.push(node); forEachEdgeType(function (edgeType) { each$1(edgeIdGetter(node, edgeType) || [], function (edgeId) { result.records[edgeType.name][edgeId] = true; }); }); }
@public @param {number} axisIndex @return {Array} seriesModels
absorb
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function setAxisModel(axisProxy, isRestore) { var axisModel = axisProxy.getAxisModel(); var percentWindow = axisProxy._percentWindow; var valueWindow = axisProxy._valueWindow; if (!percentWindow) { return; } // [0, 500]: arbitrary value, guess axis extent. var precision = getPixel...
It is `[rangeModeForMin, rangeModeForMax]`. The optional values for `rangeMode`: + `'value'` mode: the axis extent will always be determined by `dataZoom.startValue` and `dataZoom.endValue`, despite how data like and how `axis.min` and `axis.max` are. + `'percent'` mode: `100` represents 100% of the `[dMin, dMa...
setAxisModel
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function take(zr, resourceKey, userKey) { var store = getStore(zr); store[resourceKey] = userKey; }
Notice: only enable needed types. For example, if 'zoom' is not needed, 'zoom' should not be enabled, otherwise default mousewheel behaviour (scroll page) will be disabled. @param {boolean|string} [controlType=true] Specify the control type, which can be null/undefined or true/false ...
take
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function mousedown(e) { if (isMiddleOrRightButtonOnMouseUpDown(e) || (e.target && e.target.draggable) ) { return; } var x = e.offsetX; var y = e.offsetY; // Only check on mosedown, but not mousemove. // Mouse can be out of target when mouse moving. if (this.pointerCheck...
@public @param {module:echarts/ExtensionAPI} api @param {Object} dataZoomInfo @param {string} dataZoomInfo.coordId @param {Function} dataZoomInfo.containsPoint @param {Array.<string>} dataZoomInfo.allCoordIds @param {string} dataZoomInfo.dataZoomId @param {Object} dataZoomInfo.getRange @param {Function} dataZoomInfo.ge...
mousedown
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function mouseup(e) { if (!isMiddleOrRightButtonOnMouseUpDown(e)) { this._dragging = false; } }
Key: coordId, value: {dataZoomInfos: [], count, controller} @type {Array.<Object>}
mouseup
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function pinch(e) { if (isTaken(this._zr, 'globalPan')) { return; } var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1; checkPointerAndTrigger(this, 'zoom', null, e, { scale: scale, originX: e.pinchX, originY: e.pinchY }); }
Merge roamController settings when multiple dataZooms share one roamController.
pinch
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function unregister$1(api, dataZoomId) { var store = giveStore(api); each$1(store, function (record) { record.controller.dispose(); var dataZoomInfos = record.dataZoomInfos; if (dataZoomInfos[dataZoomId]) { delete dataZoomInfos[dataZoomId]; record.count--; ...
@this {module:echarts/component/dataZoom/InsideZoomView}
unregister$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function MagicType(model) { this.model = model; }
Group series into two types 1. on category axis, like line, bar 2. others, like scatter, pie @param {module:echarts/model/Global} ecModel @return {Object} @inner
MagicType
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function tryMergeDataOption(newData, originalData) { return map(newData, function (newVal, idx) { var original = originalData && originalData[idx]; if (isObject$1(original) && !isArray(original)) { if (isObject$1(newVal) && !isArray(newVal)) { newVal = newVal.value; ...
@param {Object} [opt] @return {boolean} [opt.enableGlobalPan=false]
tryMergeDataOption
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function determineBrushType(brushType, panel) { if (brushType === 'auto') { if (__DEV__) { assert$1( panel && panel.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"' ); } return panel.defaultBrushType; } re...
Avoid that: mouse click on a elements that is over geo or graph, but roam is triggered.
determineBrushType
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function getLineRenderer(xyIndex) { return { createCover: function (controller, brushOption) { return createBaseRectCover( curry$5( driftRect, function (range) { var rectRange = [range, [0, 100]]; ...
[option in constructor]: { Index/Id/Name of geo, xAxis, yAxis, grid: See util/model#parseFinder. } [targetInfo]: There can be multiple axes in a single targetInfo. Consider the case of `grid` component, a targetInfo represents a grid which contains one or more cartesian and one or more axes. And consider the cas...
getLineRenderer
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) { if (__DEV__) { assert$1( coordSys.type === 'cartesian2d', 'lineX/lineY brush is available only in cartesian2d.' ); } var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]); var values = format...
[{key: dataZoomId, value: {dataZoomId, range}}, ...] History length of each dataZoom may be different. this._history[0] is used to store origin range. @type {Array.<Object>}
axisConvert
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function pathDataToString$1(path) { var str = []; var data = path.data; var dataLength = path.len(); for (var i = 0; i < dataLength;) { var cmd = data[i++]; var cmdStr = ''; var nData = 0; switch (cmd) { case CMD$4.M: cmdStr = 'M'; ...
@param {module:zrender/Element} el @param {Object|boolean} [hostRect] {x, y, width, height} If set false, rect text is not used.
pathDataToString$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function getTextXForPadding$1(x, textAlign, textPadding) { return textAlign === 'right' ? (x - textPadding[1]) : textAlign === 'center' ? (x + textPadding[3] / 2 - textPadding[1] / 2) : (x + textPadding[3]); }
@file Manages elements that can be defined in <defs> in SVG, e.g., gradients, clip path, etc. @author Zhang Wenli
getTextXForPadding$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function updateTextLocation(tspan, textAlign, x, y) { // Consider different font display differently in vertial align, we always // set vertialAlign as 'middle', and use 'y' to locate text vertically. attr(tspan, 'dominant-baseline', 'middle'); attr(tspan, 'text-anchor', TEXT_ALIGN_TO_ANCHRO[textAlign])...
Manages elements that can be defined in <defs> in SVG, e.g., gradients, clip path, etc. @class @param {number} zrId zrender instance id @param {SVGElement} svgRoot root of SVG document @param {string|string[]} tagNames possible tag names @param {string} markLabel label name to make if th...
updateTextLocation
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function execEditLength() { for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { var basePath; var addPath = bestPath[diagonalPath - 1]; var removePath = bestPath[diagonalPath + 1]; var oldPos = (removePath ...
Update DOM element if necessary. @param {Object|string} element style element. e.g., for gradient, it may be '#ccc' or {type: 'linear', ...} @param {Function|undefined} onUpdate update callback
execEditLength
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function buildValues(diff, components, newArr, oldArr) { var componentPos = 0; var componentLen = components.length; var newPos = 0; var oldPos = 0; for (; componentPos < componentLen; componentPos++) { var component = components[componentPos]; if (!component.removed) { ...
Manages SVG gradient elements. @class @extends Definable @param {number} zrId zrender instance id @param {SVGElement} svgRoot root of SVG document
buildValues
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function clonePath(path) { return { newPos: path.newPos, components: path.components.slice(0) }; }
Create new gradient DOM for fill or stroke if not exist, but will not update gradient if exists. @param {SvgElement} svgElement SVG element to paint @param {Displayable} displayable zrender displayable element
clonePath
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function Definable( zrId, svgRoot, tagNames, markLabel, domName ) { this._zrId = zrId; this._svgRoot = svgRoot; this._tagNames = typeof tagNames === 'string' ? [tagNames] : tagNames; this._markLabel = markLabel; this._domName = domName || '_dom'; this.nextId = 0; }
Add a new gradient tag in <defs> @param {Gradient} gradient zr gradient instance @return {SVGLinearGradientElement | SVGRadialGradientElement} created DOM
Definable
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function GradientManager(zrId, svgRoot) { Definable.call( this, zrId, svgRoot, ['linearGradient', 'radialGradient'], '__gradient_in_use__' ); }
Create an SVGElement of displayable and create a <clipPath> of its clipPath @param {Displayable} parentEl parent element @param {ClipPath[]} clipPaths clipPaths of parent element @param {boolean} isText if parent element is Text
GradientManager
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function ClippathManager(zrId, svgRoot) { Definable.call(this, zrId, svgRoot, 'clipPath', '__clippath_in_use__'); }
Update shadow dom @param {Displayable} displayable zrender displayable element @param {SVGFilterElement} dom DOM to update
ClippathManager
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.common.js
Apache-2.0
function isIdInner(cptOption) { return isObject$2(cptOption) && cptOption.id && (cptOption.id + '').indexOf('\0_ec_\0') === 0; }
@param {module:echarts/data/List} data @param {Object} payload Contains dataIndex (means rawIndex) / dataIndexInside / name each of which can be Array or primary type. @return {number|Array.<number>} dataIndex If not found, return undefined/null.
isIdInner
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function increaseInterval(interval) { var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10)); // Increase interval var f = interval / exp10; if (f === 2) { f = 5; } else { // f is 2 or 5 f *= 2; } return f * exp10; ...
Radar dimensions is based on the data @type {Array}
increaseInterval
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
fixTextCoord = function (mapType, region) { if (mapType === 'china') { var coordFix = coordsOffsetMap[region.name]; if (coordFix) { var cp = region.center; cp[0] += coordFix[0] / 10.5; cp[1] += -coordFix[1] / (10.5 / 0.75); } } }
@param {string} mapName @param {Object} mapRecord {specialAreas, geoJSON} @return {Object} {regions, boundingRect}
fixTextCoord
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
fixGeoCoord = function (mapType, region) { if (mapType === 'world') { var geoCoord = geoCoordMap[region.name]; if (geoCoord) { var cp = region.center; cp[0] = geoCoord[0]; cp[1] = geoCoord[1]; } } }
@param {string} mapName @param {Object} mapRecord {specialAreas, geoJSON} @return {Object} {root, boundingRect}
fixGeoCoord
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function getBoundingRect$1(regions) { var rect; for (var i = 0; i < regions.length; i++) { var regionRect = regions[i].getBoundingRect(); rect = rect || regionRect.clone(); rect.union(regionRect); } return rect; }
@param {string} mapName @param {Object} nameMap @return {Object} source {regions, regionsMap, nameCoordMap, boundingRect}
getBoundingRect$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function buildGraphic(mapRecord, boundingRect) { var svgXML = mapRecord.svgXML; var result; var root; try { result = svgXML && parseSVG(svgXML, { ignoreViewBox: true, ignoreRootClip: true }) || {}; root = result.root; assert$1(root != null); }...
Group of all map series with same mapType @type {boolean}
buildGraphic
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function onRegionHighDown(toHighOrDown) { var highDownRecord = this[HIGH_DOWN_PROP]; if (highDownRecord && highDownRecord.recordVersion === this[RECORD_VERSION_PROP]) { enterRegionHighDown(highDownRecord, toHighOrDown); } }
@payload @property {string} [componentType=series] @property {number} [dx] @property {number} [dy] @property {number} [zoom] @property {number} [originX] @property {number} [originY]
onRegionHighDown
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function updateCenterAndZoom( view, payload, zoomLimit ) { var previousZoom = view.getZoom(); var center = view.getCenter(); var zoom = payload.zoom; var point = view.dataToPoint(center); if (payload.dx != null && payload.dy != null) { point[0] -= payload.dx; point[1] -= payloa...
Set center of view @param {Array.<number>} [centerCoord]
updateCenterAndZoom
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function doConvert$1(methodName, ecModel, finder, value) { var seriesModel = finder.seriesModel; var coordSys = seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph. return coordSys === this ? coordSys[methodName](value) : null; }
Resize method bound to the geo @param {module:echarts/coord/geo/GeoModel|module:echarts/chart/map/MapModel} geoModel @param {module:echarts/ExtensionAPI} api
doConvert$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function doConvert(methodName, ecModel, finder, value) { var geoModel = finder.geoModel; var seriesModel = finder.seriesModel; var coordSys = geoModel ? geoModel.coordinateSystem : seriesModel ? ( seriesModel.coordinateSystem // For map. || (seriesModel.getRe...
@param {module:echarts/coord/Geo} geo @param {module:echarts/model/Model} model @inner
doConvert
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function resizeGeo(geoModel, api) { var boundingCoords = geoModel.get('boundingCoords'); if (boundingCoords != null) { var leftTop = boundingCoords[0]; var rightBottom = boundingCoords[1]; if (isNaN(leftTop[0]) || isNaN(leftTop[1]) || isNaN(rightBottom[0]) || isNaN(rightBottom[1])) { ...
Fill given regions array @param {Array.<Object>} originRegionArr @param {string} mapName @param {Object} [nameMap] @return {Array}
resizeGeo
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
mapSymbolLayout = function (ecModel) { var processedMapType = {}; ecModel.eachSeriesByType('map', function (mapSeries) { var mapType = mapSeries.getMapType(); if (mapSeries.getHostGeoModel() || processedMapType[mapType]) { return; } var mapSymbolOffsets = {}; ...
@param {Array.<module:echarts/data/List>} datas @param {string} statisticType 'average' 'sum' @inner
mapSymbolLayout
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
backwardCompat$2 = function (option) { // Save geoCoord var mapSeries = []; each$1(option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'map') { mapSeries.push(seriesOpt); seriesOpt.map = seriesOpt.map || seriesOpt.mapType; // Put x, y, width,...
Supplement method to List. @public @param {string} [dataType] If not specified, return mainData. @return {module:echarts/data/List}
backwardCompat$2
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function linkList(opt) { var mainData = opt.mainData; var datas = opt.datas; if (!datas) { datas = {main: mainData}; opt.datasAttr = {main: 'data'}; } opt.datas = opt.mainData = null; linkAll(mainData, datas, opt); // Porxy data original methods. each$7(datas, function...
Travel this subtree (include this node). Usage: node.eachNode(function () { ... }); // preorder node.eachNode('preorder', function () { ... }); // preorder node.eachNode('postorder', function () { ... }); // postorder node.eachNode( {order: 'postorder', attr: 'viewChildren'}, function () { ......
linkList
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function transferInjection(opt, res) { if (isMainData(this)) { // Transfer datas to new main data. var datas = extend({}, this[DATAS]); datas[this.dataType] = res; linkAll(res, datas, opt); } else { // Modify the reference in main data to point newData. linkSi...
@param {string} id @return {module:echarts/data/Tree~TreeNode}
transferInjection
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function changeInjection(opt, res) { opt.struct && opt.struct.update(this); return res; }
@param {module:echarts/data/Tree~TreeNode} node @return {boolean}
changeInjection
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function getLinkedData(dataType) { var mainData = this[MAIN_DATA]; return (dataType == null || mainData == null) ? mainData : mainData[DATAS][dataType]; }
@param {string|Array=} [dimension='value'] Default 'value'. can be 0, 1, 2, 3 @return {number} Value.
getLinkedData
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function isMainData(data) { return data[MAIN_DATA] === data; }
@param {Object} layout @param {boolean=} [merge=false]
isMainData
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
TreeNode = function (name, hostTree) { /** * @type {string} */ this.name = name || ''; /** * Depth of node * * @type {number} * @readOnly */ this.depth = 0; /** * Height of the subtree rooted at this node. * @type {number} * @readOnly */ t...
@example setItemVisual('color', color); setItemVisual({ 'color': color });
TreeNode
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function Tree(hostModel, levelOptions, leavesOption) { /** * @type {module:echarts/data/Tree~TreeNode} * @readOnly */ this.root; /** * @type {module:echarts/data/List} * @readOnly */ this.data; /** * Index of each item is the same as the raw index of coresponding...
Init a tree data structure from data in option series @param {Object} option the object used to config echarts view @return {module:echarts/data/List} storage initial data
Tree
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function beforeLink(nodeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var node = tree.getNodeByDataIndex(idx); var leavesModel = node.getLeavesModel(); if (!node.children.length || !node.isExpand) { model.parentModel =...
Initialize all computational message for following algorithm. @param {module:echarts/data/Tree~TreeNode} root The virtual root of the tree.
beforeLink
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function firstWalk(node, separation) { var children = node.isExpand ? node.children : []; var siblings = node.parentNode.children; var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null; if (children.length) { executeShifts(node); var midPoint = (children[0].hierNode.preli...
This function is used to traverse the right contour of a subtree. It returns the rightmost child of node or the thread of node. The function returns null if and only if node is on the highest depth of its subtree. @param {module:echarts/data/Tree~TreeNode} node @return {module:echarts/data/Tree~TreeNode}
firstWalk
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function nextRight(node) { var children = node.children; return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread; }
@private @type {module:echarts/componet/helper/RoamController}
nextRight
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function getEdgeShape(seriesScope, sourceLayout, targetLayout) { var cpx1; var cpy1; var cpx2; var cpy2; var orient = seriesScope.orient; var x1; var x2; var y1; var y2; if (seriesScope.layout === 'radial') { x1 = sourceLayout.rawX; y1 = sourceLayout.rawY; ...
Traverse the tree from top to bottom and do something @param {module:echarts/data/Tree~TreeNode} root The real root of the tree @param {Function} callback
getEdgeShape
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function packEventData(el, seriesModel, itemNode) { el.eventData = { componentType: 'series', componentSubType: 'treemap', componentIndex: seriesModel.componentIndex, seriesIndex: seriesModel.componentIndex, seriesName: seriesModel.name, seriesType: 'treemap', ...
@private @type {module:echarts/component/helper/RoamController}
packEventData
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function preprocessForPiecewise(thisOption) { var pieceList = thisOption.pieceList; thisOption.hasSpecialVisual = false; each$1(pieceList, function (piece, index) { piece.originIndex = index; // piece.visual is "result visual value" but not // a visual range, so it does not need to ...
@public @param {Object} obj @return {Object} new object containers visual values. If no visuals, return null.
preprocessForPiecewise
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) { // If targetInfo.node exists, we zoom to the node, // so estimate whold width and heigth by target node. var currNode = (targetInfo || {}).node; var defaultSize = [containerWidth, containerHeight]; if (!...
@type {module:echarts/data/List} @readOnly
estimateRootSize
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function calculateRootPosition(layoutInfo, rootRect, targetInfo) { if (rootRect) { return {x: rootRect.x, y: rootRect.y}; } var defaultPosition = {x: 0, y: 0}; if (!targetInfo) { return defaultPosition; } // If targetInfo is fetched by 'retrieveTargetInfo', // old tree and ...
Add a new edge @param {number|string|module:echarts/data/Graph.Node} n1 @param {number|string|module:echarts/data/Graph.Node} n2 @param {number} [dataIndex=-1] @return {module:echarts/data/Graph.Edge}
calculateRootPosition
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function prunning(node, clipRect, viewAbovePath, viewRoot, depth) { var nodeLayout = node.getLayout(); var nodeInViewAbovePath = viewAbovePath[depth]; var isAboveViewRoot = nodeInViewAbovePath && nodeInViewAbovePath === node; if ( (nodeInViewAbovePath && !isAboveViewRoot) || (depth === ...
Get edge by data index @param {number} dataIndex @return {module:echarts/data/Graph~Node}
prunning
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function getUpperLabelHeight(model) { return model.get(PATH_UPPER_LABEL_SHOW) ? model.get(PATH_UPPER_LABEL_HEIGHT) : 0; }
Iterate all edges @param {Function} cb @param {*} [context]
getUpperLabelHeight
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function generateNodeKey(id) { return '_EC_' + id; }
Breadth first traverse @param {Function} cb @param {module:echarts/data/Graph.Node} startNode @param {string} [direction='none'] 'none'|'in'|'out' @param {*} [context]
generateNodeKey
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function edgeGetParent(path) { path = this.parsePath(path); return (path && path[0] === 'label') ? fakeSeriesModel : (path && path[0] === 'emphasis' && path[1] === 'label') ? emphasisFakeSeriesModel : this.pa...
Line path for bezier and straight line draw
edgeGetParent
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
categoryFilter = function (ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (!legendModels || !legendModels.length) { return; } ecModel.eachSeriesByType('graph', function (graphSeries) { var categoriesData = graphSeries.getCategoriesData(); ...
@payload @property {string} name Series name @property {number} [dx] @property {number} [dy] @property {number} [zoom] @property {number} [originX] @property {number} [originY]
categoryFilter
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function simpleLayout$1(seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } var graph = seriesModel.getGraph(); graph.eachNode(function (node) { var model = node.getModel(); node.setLayout([+model.get('x'), +model...
`basedOn` can be: 'value': This layout is not accurate and have same bad case. For example, if the min value is very smaller than the max value, the nodes with the min value probably overlap even though there is enough space to layout them. So we only use this approach in the as the init layout of t...
simpleLayout$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
sliderMove = function (delta, handleEnds, extent, handleIndex, minSpan, maxSpan) { delta = delta || 0; var extentSpan = extent[1] - extent[0]; // Notice maxSpan and minSpan can be null/undefined. if (minSpan != null) { minSpan = restrict$1(minSpan, [0, extentSpan]); } if (maxSpan != n...
Resize the parallel coordinate system. @param {module:echarts/coord/parallel/ParallelModel} parallelModel @param {module:echarts/ExtensionAPI} api
sliderMove
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function createLinePoints(data, dataIndex, dimensions, coordSys) { var points = []; for (var i = 0; i < dimensions.length; i++) { var dimName = dimensions[i]; var value = data.get(data.mapDimension(dimName), dataIndex); if (!isEmptyValue(value, coordSys.getAxis(dimName).type)) { ...
Init a graph data structure from data in option series @param {Object} option the object used to config echarts view @return {module:echarts/data/List} storage initial data
createLinePoints
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
function createGridClipShape$1(rect, seriesModel, cb) { var rectEl = new Rect({ shape: { x: rect.x - 10, y: rect.y - 10, width: 0, height: rect.height + 20 } }); initProps(rectEl, { shape: { width: rect.width + 20 } ...
Compute the x-position for each node. Here we use Kahn algorithm to detect cycle when we traverse the node to computer the initial x position. @param {module:echarts/data/Graph~Node} nodes node of sankey view @param {number} nodeWidth the dx of the node @param {number} width the whole width of the area to draw t...
createGridClipShape$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0
sankeyLayout = function (ecModel, api, payload) { ecModel.eachSeriesByType('sankey', function (seriesModel) { var nodeWidth = seriesModel.get('nodeWidth'); var nodeGap = seriesModel.get('nodeGap'); var layoutInfo = getViewRect$4(seriesModel, api); seriesModel.layoutInfo = layoutI...
All the node without outEgdes are assigned maximum x-position and be aligned in the last column. @param {module:echarts/data/Graph~Node} nodes. node of sankey view. @param {number} maxDepth. use to assign to node without outEdges as x-position.
sankeyLayout
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.js
Apache-2.0