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 getRichItemNames(textStyleModel) { // Use object to remove duplicated names. var richItemNameMap; while (textStyleModel && textStyleModel !== textStyleModel.ecModel) { var rich = (textStyleModel.option || EMPTY_OBJ).rich; if (rich) { richItemNameMap = richItemNameMap || ...
Give some default value to the input `textStyle` object, based on the current settings in this `textStyle` object. The Scenario: when text position is `inside` and `textFill` is not specified, we show text border by default for better view. But it should be considered that text position might be changed when hovering ...
getRichItemNames
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 getAutoColor(color, opt) { return color !== 'auto' ? color : (opt && opt.autoColor) ? opt.autoColor : null; }
Consider the case: in a scatter, label: { normal: {position: 'inside'}, emphasis: {position: 'top'} } In the normal state, the `textFill` will be set as '#fff' for pretty view (see `applyDefaultTextStyle`), but when switching to emphasis state, the `textFill` should be retured to 'autoColor', but not keep '#fff...
getAutoColor
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 rollbackDefaultTextStyle(style) { var insideRollback = style.insideRollback; if (insideRollback) { // Reset all of the props in `CACHED_LABEL_STYLE_PROPERTIES`. style.textFill = insideRollback.textFill; style.textStroke = insideRollback.textStroke; style.textStrokeWidth ...
Apply transform to an vertex. @param {Array.<number>} target [x, y] @param {Array.<number>|TypedArray.<number>|Object} transform Can be: + Transform matrix: like [1, 0, 0, 1, 0, 0] + {position, rotation, scale}, the same as `zrender/Transformable`. @param {boolean=} invert Whether use invert matrix. @return {...
rollbackDefaultTextStyle
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 getFont(opt, ecModel) { var gTextStyleModel = ecModel && ecModel.getModel('textStyle'); return trim([ // FIXME in node-canvas fontWeight is before fontStyle opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gT...
@param {string} direction 'left' 'right' 'top' 'bottom' @param {Array.<number>} transform Transform matrix: like [1, 0, 0, 1, 0, 0] @param {boolean=} invert Whether use invert matrix. @return {string} Transformed direction. 'left' 'right' 'top' 'bottom'
getFont
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(el, props, animatableModel, dataIndex, cb) { animateOrSetProps(true, el, props, animatableModel, dataIndex, cb); }
@param {Object} targetRect {x, y, width, height} @param {Object} rect {x, y, width, height} @return {Object} A new clipped rect. If rect size are negative, return undefined.
updateProps
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 initProps(el, props, animatableModel, dataIndex, cb) { animateOrSetProps(false, el, props, animatableModel, dataIndex, cb); }
@param {string} iconStr Support 'image://' or 'path://' or direct svg path. @param {Object} [opt] Properties of `module:zrender/Element`, except `style`. @param {Object} [rect] {x, y, width, height} @return {module:zrender/Element} Icon path or image element.
initProps
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 transformDirection(direction, transform, invert$$1) { // Pick a base, ensure that transform result will not be (0, 0). var hBase = (transform[4] === 0 || transform[5] === 0 || transform[0] === 0) ? 1 : Math.abs(2 * transform[4] / transform[0]); var vBase = (transform[4] === 0 || transform[...
Return `true` if the given line (line `a`) and the given polygon are intersect. Note that we do not count colinear as intersect here because no requirement for that. We could do that if required in future. @param {number} a1x @param {number} a1y @param {number} a2x @param {number} a2y @param {Array.<Array.<number>>} p...
transformDirection
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 groupTransition(g1, g2, animatableModel, cb) { if (!g1 || !g2) { return; } function getElMap(g) { var elMap = {}; g.traverse(function (el) { if (!el.isGroup && el.anid) { elMap[el.anid] = el; } }); return elMap; } ...
Return `true` if the given two lines (line `a` and line `b`) are intersect. Note that we do not count colinear as intersect here because no requirement for that. We could do that if required in future. @param {number} a1x @param {number} a1y @param {number} a2x @param {number} a2y @param {number} b1x @param {number} b...
groupTransition
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 linePolygonIntersect(a1x, a1y, a2x, a2y, points) { for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) { var p = points[i]; if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) { return true; } p2 = p; } }
Get color property or get color from option.textStyle.color @param {boolean} [isEmphasis] @return {string}
linePolygonIntersect
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 crossProduct2d(x1, y1, x2, y2) { return x1 * y2 - x2 * y1; }
Create font string from fontStyle, fontWeight, fontSize, fontFamily @return {string}
crossProduct2d
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 Model(option, parentModel, ecModel) { /** * @type {module:echarts/model/Model} * @readOnly */ this.parentModel = parentModel; /** * @type {module:echarts/model/Global} * @readOnly */ this.ecModel = ecModel; /** * @type {Object} * @protected */ ...
@public @param {string} type @return {string}
Model
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 getParent(model, path) { var getParentMethod = inner(model).getParent; return getParentMethod ? getParentMethod.call(model, path) : model.parentModel; }
DepndencyGraph: {Object} key: conponentType, value: { successor: [conponentTypes...], originalDeps: [conponentTypes...], entryCount: {number} }
getParent
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 removeEdge(succComponentType) { graph[succComponentType].entryCount--; if (graph[succComponentType].entryCount === 0) { stack.push(succComponentType); } }
Linear mapping a value from domain to range @memberOf module:echarts/util/number @param {(number|Array.<number>)} val @param {Array.<number>} domain Domain extent domain[0] can be bigger than domain[1] @param {Array.<number>} range Range extent range[0] can be bigger than range[1] @param {boolean} clamp @return {(...
removeEdge
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 removeEdgeAndAdd(succComponentType) { targetNameSet[succComponentType] = true; removeEdge(succComponentType); }
Convert a percent string to absolute number. Returns NaN if percent is not a valid string or number @memberOf module:echarts/util/number @param {string|number} percent @param {number} all @return {number}
removeEdgeAndAdd
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 getAvailableDependencies(originalDeps, fullNameList) { var availableDeps = []; each$1(originalDeps, function (dep) { indexOf(fullNameList, dep) >= 0 && availableDeps.push(dep); }); return availableDeps; }
@param {string|number} val @return {number}
getAvailableDependencies
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 _trim(str) { return str.replace(/^\s+|\s+$/g, ''); }
Get a data of given precision, assuring the sum of percentages in valueList is 1. The largest remainer method is used. https://en.wikipedia.org/wiki/Largest_remainder_method @param {Array.<number>} valueList a list of all data @param {number} idx index of the data to be processed in valueList @param {number} precision...
_trim
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 asc(arr) { arr.sort(function (a, b) { return a - b; }); return arr; }
@param {string|Date|number} value These values can be accepted: + An instance of Date, represent a time in its own time zone. + Or string in a subset of ISO 8601, only including: + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06', + separated with T or space: '2012-03-01T...
asc
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 quantity(val) { return Math.pow(10, quantityExponent(val)); }
parseFloat NaNs numeric-cast false positives (null|true|false|"") ...but misinterprets leading-number strings, particularly hex literals ("0x...") subtraction forces infinities to NaN @param {*} v @return {boolean}
quantity
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 reformIntervals(list) { list.sort(function (a, b) { return littleThan(a, b, 0) ? -1 : 1; }); var curr = -Infinity; var currClose = 1; for (var i = 0; i < list.length;) { var interval = list[i].interval; var close = list[i].close; for (var lg = 0; lg < 2; lg...
simple Template formatter @param {string} tpl @param {Object} param @param {boolean} [encode=false] @return {string}
reformIntervals
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 toCamelCase(str, upperCaseFirst) { str = (str || '').toLowerCase().replace(/-(.)/g, function (match, group1) { return group1.toUpperCase(); }); if (upperCaseFirst && str) { str = str.charAt(0).toUpperCase() + str.slice(1); } return str; }
Capital first @param {string} str @return {string}
toCamelCase
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 encodeHTML(source) { return source == null ? '' : (source + '').replace(replaceReg, function (str, c) { return replaceMap[c]; }); }
@public @param {Object} opt @param {string} opt.text @param {string} opt.font @param {string} [opt.textAlign='left'] @param {string} [opt.textVerticalAlign='top'] @param {Array.<number>} [opt.textPadding] @param {number} [opt.textLineHeight] @param {Object} [opt.rich] @param {Object} [opt.truncate] @return {Object} {x,...
encodeHTML
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 formatTpl(tpl, paramsList, encode) { if (!isArray(paramsList)) { paramsList = [paramsList]; } var seriesLen = paramsList.length; if (!seriesLen) { return ''; } var $vars = paramsList[0].$vars || []; for (var i = 0; i < $vars.length; i++) { var alias = TPL_VA...
@deprecated the `textLineHeight` was added later. For backward compatiblility, put it as the last parameter. But deprecated this interface. Please use `getTextBoundingRect` instead.
formatTpl
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 capitalFirst(str) { return str ? str.charAt(0).toUpperCase() + str.substr(1) : str; }
VBox layouting @param {module:zrender/container/Group} group @param {number} gap @param {number} [width=Infinity] @param {number} [height=Infinity]
capitalFirst
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 getTextBoundingRect(opt) { return getBoundingRect( opt.text, opt.font, opt.textAlign, opt.textVerticalAlign, opt.textPadding, opt.textLineHeight, opt.rich, opt.truncate ); }
HBox layouting @param {module:zrender/container/Group} group @param {number} gap @param {number} [width=Infinity] @param {number} [height=Infinity]
getTextBoundingRect
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 boxLayout(orient, group, gap, maxWidth, maxHeight) { var x = 0; var y = 0; if (maxWidth == null) { maxWidth = Infinity; } if (maxHeight == null) { maxHeight = Infinity; } var currentLineMaxSize = 0; group.eachChild(function (child, idx) { var position =...
Parse position info. @param {Object} positionInfo @param {number|string} [positionInfo.left] @param {number|string} [positionInfo.top] @param {number|string} [positionInfo.right] @param {number|string} [positionInfo.bottom] @param {number|string} [positionInfo.width] @param {number|string} [positionInfo.height] @param...
boxLayout
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 getLayoutRect( positionInfo, containerRect, margin ) { margin = normalizeCssArray$1(margin || 0); var containerWidth = containerRect.width; var containerHeight = containerRect.height; var left = parsePercent$1(positionInfo.left, containerWidth); var top = parsePercent$1(positionInfo.t...
Position a zr element in viewport Group position is specified by either {left, top}, {right, bottom} If all properties exists, right and bottom will be igonred. Logic: 1. Scale (against origin point in parent coord) 2. Rotate (against origin point in parent coord) 3. Traslate (with el.position by this m...
getLayoutRect
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 positionElement(el, positionInfo, containerRect, margin, opt) { var h = !opt || !opt.hv || opt.hv[0]; var v = !opt || !opt.hv || opt.hv[1]; var boundingMode = opt && opt.boundingMode || 'all'; if (!h && !v) { return; } var rect; if (boundingMode === 'raw') { rect =...
Consider Case: When defulat option has {left: 0, width: 100}, and we set {right: 0} through setOption or media query, using normal zrUtil.merge will cause {right: 0} does not take effect. @example ComponentModel.extend({ init: function () { ... var inputPositionParams = layout.getLayoutParams(optio...
positionElement
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 getDependencies(componentType) { var deps = []; each$1(ComponentModel.getClassesByMainType(componentType), function (Clazz) { deps = deps.concat(Clazz.prototype.dependencies || []); }); // Ensure main type. deps = map(deps, function (type) { return parseClassType$1(type).ma...
@param {string} name MUST NOT be null/undefined. Otherwise call this function twise with the same parameters will get different result. @param {Object} [scope=this] @param {Object} [requestColorNum] @return {string} color string.
getDependencies
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 Source(fields) { /** * @type {boolean} */ this.fromDataset = fields.fromDataset; /** * Not null/undefined. * @type {Array|Object} */ this.data = fields.data || ( fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : [] ); /** * See also "det...
MUST be called before mergeOption of all series. @param {module:echarts/model/Global} ecModel
Source
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 detectSourceFormat(datasetModel) { var data = datasetModel.option.source; var sourceFormat = SOURCE_FORMAT_UNKNOWN; if (isTypedArray(data)) { sourceFormat = SOURCE_FORMAT_TYPED_ARRAY; } else if (isArray(data)) { // FIXME Whether tolerate null in top level array? if ...
[Caution]: MUST be called after series option merged and before "series.getInitailData()" called. [The rule of making default encode]: Category axis (if exists) alway map to the first dimension. Each other axis occupies a subsequent dimension. [Why make default encode]: Simplify the typing of encode in option, avoidi...
detectSourceFormat
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 normalizeDimensionsDefine(dimensionsDefine) { if (!dimensionsDefine) { // The meaning of null/undefined is different from empty array. return; } var nameMap = createHashMap(); return map(dimensionsDefine, function (item, index) { item = extend({}, isObject$1(item) ? item...
[The strategy of the arrengment of data dimensions for dataset]: "value way": all axes are non-category axes. So series one by one take several (the number is coordSysDims.length) dimensions from dataset. The result of data arrengment of data dimensions like: | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | s...
normalizeDimensionsDefine
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 arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) { maxLoop == null && (maxLoop = Infinity); if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { for (var i = 0; i < data.length && i < maxLoop; i++) { cb(data[i] ? data[i][0] : null, i); } } else { var value0 ...
Work for data like [{name: ..., value: ...}, ...]. @param {module:model/Series} seriesModel @param {module:data/Source} source @return {Object} encode Never be `null/undefined`.
arrayRowsTravelFirst
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 pushDim(dimIdxArr, idxFrom, idxCount) { for (var i = 0; i < idxCount; i++) { dimIdxArr.push(idxFrom + i); } }
The rule should not be complex, otherwise user might not be able to known where the data is wrong. The code is ugly, but how to make it neat? @param {module:echars/data/Source} source @param {number} dimIndex @return {BE_ORDINAL} guess result.
pushDim
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 getDatasetModel(seriesModel) { var option = seriesModel.option; // Caution: consider the scenario: // A dataset is declared and a series is not expected to use the dataset, // and at the beginning `setOption({series: { noData })` (just prepare other // option but no data), then `setOption({...
ECharts global model @module {echarts/model/Global}
getDatasetModel
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 guessOrdinal(source, dimIndex) { return doGuessOrdinal( source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex ); }
@alias module:echarts/model/Global @param {Object} option @param {module:echarts/model/Model} parentModel @param {Object} theme
guessOrdinal
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 visitComponent(mainType, dependencies) { var newCptOptionList = normalizeToArray(newOption[mainType]); var mapResult = mappingToExists( componentsMap.get(mainType), newCptOptionList ); makeIdAndName(mapResult); // Set mainType and ...
@param {string} mainType @param {number} [idx=0] @return {module:echarts/model/Component}
visitComponent
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 getQueryCond(q) { var indexAttr = mainType + 'Index'; var idAttr = mainType + 'Id'; var nameAttr = mainType + 'Name'; return q && ( q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null ...
@param {module:echarts/model/Series} seriesModel
getQueryCond
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 createSeriesIndices(ecModel, seriesModels) { ecModel._seriesIndicesMap = createHashMap( ecModel._seriesIndices = map(seriesModels, function (series) { return series.componentIndex; }) || [] ); }
ECharts option manager @module {echarts/model/OptionManager}
createSeriesIndices
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 CoordinateSystemManager() { this._coordinateSystems = []; }
@public @param {Object} rawOption Raw option. @param {module:echarts/model/Global} ecModel @param {Array.<Function>} optionPreprocessorFuncs @return {Object} Init option
CoordinateSystemManager
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 OptionManager(api) { /** * @private * @type {module:echarts/ExtensionAPI} */ this._api = api; /** * @private * @type {Array.<number>} */ this._timelineOptions = []; /** * @private * @type {Array.<Object>} */ this._mediaList = []; /** ...
@param {module:echarts/model/Global} ecModel @return {Array.<Object>}
OptionManager
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
dataStack = function (ecModel) { var stackInfoMap = createHashMap(); ecModel.eachSeries(function (seriesModel) { var stack = seriesModel.get('stack'); // Compatibal: when `stack` is set as '', do not stack. if (stack) { var stackInfoList = stackInfoMap.get(stack) || stackInfo...
If normal array used, mutable chunk size is supported. If typed array used, chunk size must be fixed.
dataStack
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 countSimply() { return this._data.length; }
Compatible with some cases (in pie, map) like: data: [{name: 'xx', value: 5, selected: true}, ...] where only sourceFormat is 'original' and 'objectRows' supported. ??? TODO Supported detail options in data item when using 'arrayRows'. @param {module:echarts/data/List} data @param {number} dataIndex @param {string} a...
countSimply
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 getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) { return converDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]); }
Get params for formatter @param {number} dataIndex @param {string} [dataType] @return {Object}
getDimValueSimply
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 retrieveRawValue(data, dataIndex, dim) { if (!data) { return; } // Consider data may be not persistent. var dataItem = data.getRawDataItem(dataIndex); if (dataItem == null) { return; } var sourceFormat = data.getProvider().getSource().sourceFormat; var dimName...
Format label @param {number} dataIndex @param {string} [status='normal'] 'normal' or 'emphasis' @param {string} [dataType] @param {number} [dimIndex] Only used in some chart that use formatter in different dimensions, like radar. @param {string} [labelProp='label'] @return {string} If not formatter, return null/...
retrieveRawValue
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 retrieveRawAttr(data, dataIndex, attr) { if (!data) { return; } var sourceFormat = data.getProvider().getSource().sourceFormat; if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS ) { return; } var dataItem = data.getR...
Get raw value in option @param {number} idx @param {string} [dataType] @return {Array|number|string}
retrieveRawAttr
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 createTask(define) { return new Task(define); }
@param {Object} performArgs @param {number} [performArgs.step] Specified step. @param {number} [performArgs.skip] Skip customer perform call. @param {number} [performArgs.modBy] Sampling window size. @param {number} [performArgs.modDataCount] Sampling count.
createTask
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 normalizeModBy(val) { !(val >= 1) && (val = 1); // jshint ignore:line return val; }
@param {Object} downTask The downstream task. @return {Object} The downstream task.
normalizeModBy
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 reset(taskIns, skip) { taskIns._dueIndex = taskIns._outputDueEnd = taskIns._dueEnd = 0; taskIns._settedOutputEnd = null; var progress; var forceFirstProgress; if (!skip && taskIns._reset) { progress = taskIns._reset(taskIns.context); if (progress && progress.progress) { ...
Access path of color for visual
reset
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 setEachItem(val, dim) { var dimInfo = data.getDimensionInfo(dim); // If `dimInfo.tooltip` is not set, show tooltip. if (!dimInfo || dimInfo.otherDims.tooltip === false) { return; } var dimType = dimInfo.type; ...
Get progressive rendering count each step @return {number}
setEachItem
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 formatSingleValue(val) { // return encodeHTML(addCommas(val)); return { renderMode: renderMode, content: encodeHTML(addCommas(val)), style: markers }; }
MUST be called after `prepareSource` called Here we need to make auto series, especially for auto legend. But we do not modify series.name in option to avoid side effects.
formatSingleValue
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 autoSeriesName(seriesModel) { // User specified name has higher priority, otherwise it may cause // series can not be queried unexpectedly. var name = seriesModel.name; if (!isNameSpecified(seriesModel)) { seriesModel.name = getSeriesAutoName(seriesModel) || name; } }
@return {string} If large mode changed, return string 'reset';
autoSeriesName
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
Component$1 = function () { /** * @type {module:zrender/container/Group} * @readOnly */ this.group = new Group(); /** * @type {string} * @readOnly */ this.uid = getUID('viewComponent'); }
Downplay series or specified data item. @param {module:echarts/model/Series} seriesModel @param {module:echarts/model/Global} ecModel @param {module:echarts/ExtensionAPI} api @param {Object} payload
Component$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
createRenderPlanner = function () { var inner = makeInner(); return function (seriesModel) { var fields = inner(seriesModel); var pipelineContext = seriesModel.pipelineContext; var originalLarge = fields.large; var originalProgressive = fields.progressiveRender; // FIX...
@param {string} eventType @param {Object} query @param {module:zrender/Element} targetEl @param {Object} packedEvent @return {boolen} Pass only when return `true`.
createRenderPlanner
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 Chart() { /** * @type {module:zrender/container/Group} * @readOnly */ this.group = new Group(); /** * @type {string} * @readOnly */ this.uid = getUID('viewChart'); this.renderTask = createTask({ plan: renderTaskPlan, reset: renderTaskReset ...
@param {module:echarts/data/List} data @param {Object} payload @param {string} state 'normal'|'emphasis'
Chart
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 getConfig(path) { var userConfig = ariaModel.get(path); if (userConfig == null) { var pathArr = path.split('.'); var result = lang.aria; for (var i = 0; i < pathArr.length; ++i) { result = result[pathArr[i]]; } return r...
@private @type { [handlerUID: string]: { seriesTaskMap?: { [seriesUID: string]: Task }, overallTask?: Task } }
getConfig
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 getTitle() { var title = ecModel.getModel('title').option; if (title && title.length) { title = title[0]; } return title && title.text; }
@param {module:echarts/model/Global} ecModel @param {Object} payload
getTitle
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 Scheduler(ecInstance, api, dataProcessorHandlers, visualHandlers) { this.ecInstance = ecInstance; this.api = api; this.unfinished; // Fix current processors in case that in some rear cases that // processors might be registered after echarts instance created. // Register processors inc...
Current, progressive rendering starts from visual and layout. Always detect render mode in the same stage, avoiding that incorrect detection caused by data filtering. Caution: `updateStreamModes` use `seriesModel.getData()`.
Scheduler
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 createStub(seriesModel) { var pipelineId = seriesModel.uid; var stub = agentStubMap.get(pipelineId); if (!stub) { stub = agentStubMap.set(pipelineId, createTask( {reset: stubReset, onDirty: stubOnDirty} )); // When the result of `getTa...
Only some legacy stage handlers (usually in echarts extensions) are pure function. To ensure that they can work normally, they should work in block mode, that is, they should not be started util the previous tasks finished. So they cause the progressive rendering disabled. We try to detect the series type, to narrow do...
createStub
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
axisCommon = function () { return { axisLine: { lineStyle: { color: contrastColor } }, axisTick: { lineStyle: { color: contrastColor } }, axisLabel: { textStyle: { colo...
For big svg string, this method might be time consuming. @param {string} svg xml string @return {Object} xml root.
axisCommon
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 parseAttributes(xmlNode, el, defs, onlyInlineStyle) { var zrStyle = el.__inheritedStyle || {}; var isTextEl = el.type === 'text'; // TODO Shadow if (xmlNode.nodeType === 1) { parseTransformAttribute(xmlNode, el); extend(zrStyle, parseStyleAttribute(xmlNode)); if (!onl...
@param {Array.<number>} viewBoxRect @param {number} width @param {number} height @return {Object} {scale, position}
parseAttributes
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 getPaint(str, defs) { // if (str === 'none') { // return; // } var urlMatch = defs && str && str.match(urlRegex); if (urlMatch) { var url = trim(urlMatch[1]); var def = defs[url]; return def; } return str; }
@param {string|XMLElement} xml @param {Object} [opt] @param {number} [opt.width] Default width if svg width not specified or is a percent value. @param {number} [opt.height] Default height if svg height not specified or is a percent value. @param {boolean} [opt.ignoreViewBox] @param {boolean} [opt.ignoreRootClip] @retu...
getPaint
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 ECharts(dom, theme$$1, opts) { opts = opts || {}; // Get theme by name if (typeof theme$$1 === 'string') { theme$$1 = themeStorage[theme$$1]; } /** * @type {string} */ this.id; /** * Group id * @type {string} */ this.group; /** * @ty...
Usage: chart.setOption(option, notMerge, lazyUpdate); chart.setOption(option, { notMerge: ..., lazyUpdate: ..., silent: ... }); @param {Object} option @param {Object|boolean} [opts] opts or notMerge. @param {boolean} [opts.notMerge=false] @param {boolean} [opts.lazyUpdate=false] Useful when setOption frequ...
ECharts
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 prepare(ecIns) { var ecModel = ecIns._model; var scheduler = ecIns._scheduler; scheduler.restorePipelines(ecModel); scheduler.prepareStageTasks(); prepareView(ecIns, 'component', ecModel, scheduler); prepareView(ecIns, 'chart', ecModel, scheduler); scheduler.plan(); }
@pubilc @param {Object} payload @param {string} [payload.type] Action type @param {Object|boolean} [opt] If pass boolean, means opt.silent @param {boolean} [opt.silent=false] Whether trigger events. @param {boolean} [opt.flush=undefined] true: Flush immediately, and then pixel in canvas can be fetched ...
prepare
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 flushPendingActions(silent) { var pendingActions = this._pendingActions; while (pendingActions.length) { var payload = pendingActions.shift(); doDispatchAction.call(this, payload, silent); } }
// * Encode visual infomation from data after data processing // * // * @param {module:echarts/model/Global} ecModel // * @param {object} layout // * @param {boolean} [layoutFilter] `true`: only layout, // * `false`: only not layout, // * `null`/`un...
flushPendingActions
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 disposedWarning(id) { if (__DEV__) { console.warn('Instance ' + id + ' has been disposed'); } }
@class Usage of query: `chart.on('click', query, handler);` The `query` can be: + The component type query string, only `mainType` or `mainType.subType`, like: 'xAxis', 'series', 'xAxis.category' or 'series.line'. + The component query object, like: `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`, ...
disposedWarning
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 updateZ(model, view) { var z = model.get('z'); var zlevel = model.get('zlevel'); // Set z and zlevel view.group.traverse(function (el) { if (el.type !== 'group') { z != null && (el.z = z); zlevel != null && (el.zlevel = zlevel); } }); }
Map eventType to actionType @type {Object}
updateZ
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 createExtensionAPI(ecInstance) { var coordSysMgr = ecInstance._coordSysMgr; return extend(new ExtensionAPI(ecInstance), { // Inject methods getCoordinateSystems: bind( coordSysMgr.getCoordinateSystems, coordSysMgr ), getComponentByElement: function (el) { ...
Visual encoding functions of each stage @type {Array.<Object.<string, Function>>}
createExtensionAPI
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 enableConnect(chart) { var STATUS_PENDING = 0; var STATUS_UPDATING = 1; var STATUS_UPDATED = 2; var STATUS_KEY = '__connectUpdateStatus'; function updateConnectedChartsStatus(charts, status) { for (var i = 0; i < charts.length; i++) { var otherChart = charts[i]; ...
@param {number} [priority=1000] @param {Object|Function} processor
enableConnect
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 init(dom, theme$$1, opts) { if (__DEV__) { // Check version if ((version$1.replace('.', '') - 0) < (dependencies.zrender.replace('.', '') - 0)) { throw new Error( 'zrender/src ' + version$1 + ' is too old for ECharts ' + version + ...
Get dimensions of specified coordinate system. @param {string} type @return {Array.<string|Object>}
init
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 connect(groupId) { // Is array of charts if (isArray(groupId)) { var charts = groupId; groupId = null; // If any chart has group each(charts, function (chart) { if (chart.group != null) { groupId = chart.group; } }); ...
@param {Object} opts @param {string} [superClass]
connect
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 registerAction(actionInfo, eventName, action) { if (typeof eventName === 'function') { action = eventName; eventName = ''; } var actionType = isObject(actionInfo) ? actionInfo.type : ([actionInfo, actionInfo = { event: eventName }][0]); // Ev...
ZRender need a canvas context to do measureText. But in node environment canvas may be created by node-canvas. So we need to specify how to create a canvas instead of using document.createElement('canvas') Be careful of using it in the browser. @param {Function} creator @example var Canvas = require('canvas'); ...
registerAction
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 getIndicesCtor(list) { // The possible max value in this._indicies is always this._rawCount despite of filtering. return list._rawCount > 65535 ? CtorUint32Array : CtorUint16Array; }
Cache summary info for fast visit. See "dimensionHelper". @type {Object} @private
getIndicesCtor
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 transferProperties(target, source) { each$1(TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []), function (propName) { if (source.hasOwnProperty(propName)) { target[propName] = source[propName]; } }); target.__wrappedMethods = source.__wrappedMethods; eac...
User output info of this data. DO NOT use it in other places! When preparing user params for user callbacks, we have to clone these inner data structures to prevent users from modifying them to effect built-in logic. And for performance consideration we make this `userOutput` to avoid clone them too many times. @type...
transferProperties
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
List = function (dimensions, hostModel) { dimensions = dimensions || ['x', 'y']; var dimensionInfos = {}; var dimensionNames = []; var invertedIndicesMap = {}; for (var i = 0; i < dimensions.length; i++) { // Use the original dimensions[i], where other flag props may exists. var d...
If each data item has it's own option @type {boolean}
List
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 prepareChunks(storage, dimInfo, chunkSize, chunkCount, end) { var DataCtor = dataCtors[dimInfo.type]; var lastChunkIndex = chunkCount - 1; var dim = dimInfo.name; var resizeChunkArray = storage[dim][lastChunkIndex]; if (resizeChunkArray && resizeChunkArray.length < chunkSize) { var ...
FIXME Use `get` on chrome maybe slow(in filterSelf and selectRange). Hack a much simpler _getFast @private
prepareChunks
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 prepareInvertedIndex(list) { var invertedIndicesMap = list._invertedIndicesMap; each$1(invertedIndicesMap, function (invertedIndices, dim) { var dimInfo = list._dimensionInfos[dim]; // Currently, only dimensions that has ordinalMeta can create inverted indices. var ordinalMeta ...
If value is NaN. Inlcuding '-' Only check the coord dimensions. @param {string} dim @param {number} idx @return {number}
prepareInvertedIndex
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 getRawValueFromStore(list, dimIndex, rawIndex) { var val; if (dimIndex != null) { var chunkSize = list._chunkSize; var chunkIndex = Math.floor(rawIndex / chunkSize); var chunkOffset = rawIndex % chunkSize; var dim = list.dimensions[dimIndex]; var chunk = list._st...
Get extent of data in one dimension @param {string} dim @param {boolean} stack
getRawValueFromStore
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 getRawIndexWithoutIndices(idx) { return idx; }
Select data in range. (For optimization of filter) (Manually inline code, support 5 million data filtering in data zoom.)
getRawIndexWithoutIndices
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 cloneDimStore(originalDimStore) { var newDimStore = new Array(originalDimStore.length); for (var j = 0; j < originalDimStore.length; j++) { newDimStore[j] = cloneChunk(originalDimStore[j]); } return newDimStore; }
Get visual property. @param {string} key
cloneDimStore
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 getInitialExtent() { return [Infinity, -Infinity]; }
Set visual property @param {string|Object} key @param {*} [value] @example setVisual('color', color); setVisual({ 'color': color });
getInitialExtent
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
setItemDataAndSeriesIndex = function (child) { child.seriesIndex = this.seriesIndex; child.dataIndex = this.dataIndex; child.dataType = this.dataType; }
@deprecated Use `echarts/data/helper/createDimensions` instead.
setItemDataAndSeriesIndex
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 completeDimensions(sysDims, source, opt) { if (!Source.isInstance(source)) { source = Source.seriesDataToSource(source); } opt = opt || {}; sysDims = (sysDims || []).slice(); var dimsDef = (opt.dimsDef || []).slice(); var dataDimNameMap = createHashMap(); var coordDimNameMa...
@see {module:echarts/test/ut/spec/data/completeDimensions} This method builds the relationship between: + "what the coord sys or series requires (see `sysDims`)", + "what the user defines (in `encode` and `dimensions`, see `opt.dimsDef` and `opt.encodeDef`)" + "what the data source provids (see `source`)". Some guess...
completeDimensions
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 applyDim(resultItem, coordDim, coordDimIndex) { if (OTHER_DIMENSIONS.get(coordDim) != null) { resultItem.otherDims[coordDim] = coordDimIndex; } else { resultItem.coordDim = coordDim; resultItem.coordDimIndex = coordDimIndex; coordDimNameMa...
@param {module:echarts/data/Source|module:echarts/data/List} source or data. @param {Object|Array} [opt] @param {Array.<string|Object>} [opt.coordDimensions=[]] @param {number} [opt.dimensionsCount] @param {string} [opt.generateCoord] @param {string} [opt.generateCoordCount] @param {Array.<string|Object>} [opt.dimensio...
applyDim
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 isCategory(axisModel) { return axisModel.get('type') === 'category'; }
@param {module:echarts/data/List} data @param {string} stackedDim
isCategory
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 enableDataStack(seriesModel, dimensionInfoList, opt) { opt = opt || {}; var byIndex = opt.byIndex; var stackedCoordDimension = opt.stackedCoordDimension; // Compatibal: when `stack` is set as '', do not stack. var mayStack = !!(seriesModel && seriesModel.get('stack')); var stackedByDim...
@param {module:echarts/data/List} data @param {string} targetDim @param {string} [stackedByDim] If not input this parameter, check whether stacked by index. @return {string} dimension
enableDataStack
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 isDimensionStacked(data, stackedDim /*, stackedByDim*/) { // Each single series only maps to one pair of axis. So we do not need to // check stackByDim, whatever stacked by a dimension or stacked by index. return !!stackedDim && stackedDim === data.getCalculationInfo('stackedDimension'); //...
@param {module:echarts/data/Source|Array} source Or raw data. @param {module:echarts/model/Series} seriesModel @param {Object} [opt] @param {string} [opt.generateCoord] @param {boolean} [opt.useEncodeDefaulter]
isDimensionStacked
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 createListFromArray(source, seriesModel, opt) { opt = opt || {}; if (!Source.isInstance(source)) { source = Source.seriesDataToSource(source); } var coordSysName = seriesModel.get('coordinateSystem'); var registeredCoordSys = CoordinateSystemManager.get(coordSysName); var coo...
Normalize value to linear [0, 1], return 0.5 if extent span is 0 @param {number} val @return {number}
createListFromArray
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 Scale(setting) { this._setting = setting || {}; /** * Extent * @type {Array.<number>} * @protected */ this._extent = [Infinity, -Infinity]; /** * Step is calculated in adjustExtent * @type {Array.<number>} * @protected */ this._interval = 0; th...
@param {*} category @return {number} The ordinal. If not found, return NaN.
Scale
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 getOrCreateMap(ordinalMeta) { return ordinalMeta._map || ( ordinalMeta._map = createHashMap(ordinalMeta.categories) ); }
@param {Array.<number>} extent Both extent[0] and extent[1] should be valid number. Should be extent[0] < extent[1]. @param {number} splitNumber splitNumber should be >= 1. @param {number} [minInterval] @param {number} [maxInterval] @return {Object} {interval, intervalPrecision, niceTickE...
getOrCreateMap
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 intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) { var result = {}; var span = extent[1] - extent[0]; var interval = result.interval = nice(span / splitNumber, true); if (minInterval != null && interval < minInterval) { interval = result.interval = minInterval; ...
@param {boolean} [expandToNicedExtent=false] If expand the ticks to niced extent. @return {Array.<number>}
intervalScaleNiceTicks
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 getIntervalPrecision(interval) { // Tow more digital for tick. return getPrecisionSafe(interval) + 2; }
@param {number} [splitNumber=5] @return {Array.<Array.<number>>}
getIntervalPrecision
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 getSeriesStackId(seriesModel) { return seriesModel.get('stack') || STACK_PREFIX + seriesModel.seriesIndex; }
Map from axis.index to values. For a single time axis, axisValues is in the form like {'x_0': [1495555200000, 1495641600000, 1495728000000]}. Items in axisValues[x], e.g. 1495555200000, are time values of all series.
getSeriesStackId
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 retrieveColumnLayout(barWidthAndOffset, axis, seriesModel) { if (barWidthAndOffset && axis) { var result = barWidthAndOffset[getAxisKey(axis)]; if (result != null && seriesModel != null) { result = result[getSeriesStackId(seriesModel)]; } return result; } }
@param {string} seriesType @param {module:echarts/model/Global} ecModel
retrieveColumnLayout
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 fixRoundingError(val, originalVal) { return roundingErrorFix(val, getPrecisionSafe$1(originalVal)); }
Get axis scale extent before niced. Item of returned array can only be number (including Infinity and NaN).
fixRoundingError
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 adjustScaleForOverflow(min, max, model, barWidthAndOffset) { // Get Axis Length var axisExtent = model.axis.getExtent(); var axisLength = axisExtent[1] - axisExtent[0]; // Get bars on current base axis and calculate min and max overflow var barsOnCurrentAxis = retrieveColumnLayout(barWidt...
@param {module:echarts/coord/Axis} axis @return {Function} Label formatter function. param: {number} tickValue, param: {number} idx, the index in all ticks. If category axis, this param is not requied. return: {string} label string.
adjustScaleForOverflow
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 niceScaleExtent(scale, model) { var extent = getScaleExtent(scale, model); var fixMin = model.getMin() != null; var fixMax = model.getMax() != null; var splitNumber = model.get('splitNumber'); if (scale.type === 'log') { scale.base = model.get('logBase'); } var scaleType =...
@param {module:echarts/coord/Axis} axis @return {module:zrender/core/BoundingRect} Be null/undefined if no labels.
niceScaleExtent
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 createScaleByModel(model, axisType) { axisType = axisType || model.get('type'); if (axisType) { switch (axisType) { // Buildin scale case 'category': return new OrdinalScale( model.getOrdinalMeta ? model.getOrdi...
Set `categoryInterval` as 0 implicitly indicates that show all labels reguardless of overlap. @param {Object} axis axisModel.axis @return {boolean}
createScaleByModel
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 makeLabelFormatter(axis) { var labelFormatter = axis.getLabelModel().get('formatter'); var categoryTickStart = axis.type === 'category' ? axis.scale.getExtent()[0] : null; if (typeof labelFormatter === 'string') { labelFormatter = (function (tpl) { return function (val) { ...
@param {boolean} origin @return {number|string} min value or 'dataMin' or null/undefined (means auto) or NaN
makeLabelFormatter
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 getAxisRawValue(axis, value) { // In category axis with data zoom, tick is not the original // index of axis.data. So tick should not be exposed to user // in category axis. return axis.type === 'category' ? axis.scale.getLabel(value) : value; }
@param {number} rangeStart Can only be finite number or null/undefined or NaN. @param {number} rangeEnd Can only be finite number or null/undefined or NaN.
getAxisRawValue
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 decode(json) { if (!json.UTF8Encoding) { return json; } var encodeScale = json.UTF8Scale; if (encodeScale == null) { encodeScale = 1024; } var features = json.features; for (var f = 0; f < features.length; f++) { var feature = features[f]; var geome...
@param {module:echats/coord/Axis} axis @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea. @return {Object} { ticks: Array.<number> tickCategoryInterval: number }
decode
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