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 getViewRect$4(seriesModel, api) { return getLayoutRect( seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() } ); }
Using Gauss-Seidel iterations method to compute the node depth(y-position) @param {module:echarts/data/Graph~Node} nodes node of sankey view @param {module:echarts/data/Graph~Edge} edges edge of sankey view @param {number} height the whole height of the area to draw the view @param {number} nodeGap the vertical di...
getViewRect$4
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 computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) { // Used to mark whether the edge is deleted. if it is deleted, // the value is 0, otherwise it is 1. var remainEdges = []; // Storage each node's indegree. var indegreeArr = []; //Used to storage the node w...
Compute the original y-position for each node @param {module:echarts/data/Graph~Node} nodes node of sankey view @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth group by the array of all sankey nodes based on the nodes x-position. @param {module:echarts/data/Graph~Edge} edges edge of sankey...
computeNodeBreadths
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 moveSinksRight(nodes, maxDepth) { each$1(nodes, function (node) { if (!isNodeDepth(node) && !node.outEdges.length) { node.setLayout({depth: maxDepth}, true); } }); }
Change the y-position of the nodes, except most the right side nodes @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth group by the array of all sankey nodes based on the node x-position. @param {number} alpha parameter used to adjust the nodes y-position
moveSinksRight
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 layoutSingleSeries(seriesModel, offset, boxWidth) { var coordSys = seriesModel.coordinateSystem; var data = seriesModel.getData(); var halfWidth = boxWidth / 2; var cDimIdx = seriesModel.get('layout') === 'horizontal' ? 0 : 1; var vDimIdx = 1 - cDimIdx; var coordDims = ['x', 'y']; v...
Get dimension for shadow in dataZoom @return {string} dimension name
layoutSingleSeries
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 subPixelOptimizePoint(point) { point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1); return point; }
Symbol with ripple effect @module echarts/chart/helper/EffectSymbol
subPixelOptimizePoint
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 getSign(data, dataIndex, openVal, closeVal, closeDim) { var sign; if (openVal > closeVal) { sign = -1; } else if (openVal < closeVal) { sign = 1; } else { sign = dataIndex > 0 // If close === open, compare with close of last record ? (data...
@constructor @param {module:echarts/data/List} data @param {number} idx @extends {module:zrender/graphic/Group}
getSign
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 EffectLine(lineData, idx, seriesScope) { Group.call(this); this.add(this.createLine(lineData, idx, seriesScope)); this._updateEffectSymbol(lineData, idx); }
@constructor @extends {module:zrender/graphic/Group} @alias {module:echarts/chart/helper/Polyline}
EffectLine
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 normalize$2(a) { if (!(a instanceof Array)) { a = [a, a]; } return a; }
Renders Heatmap and returns the rendered canvas @param {Array} data array of data, each has x, y, value @param {number} width canvas width @param {number} height canvas height
normalize$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 dataEach(data, idx) { var itemModel = data.getItemModel(idx); var symbolType = normalize$2(itemModel.getShallow('symbol', true)); var symbolSize = normalize$2(itemModel.getShallow('symbolSize', true)); var opacity = itemModel.get(opacityQuery); symbo...
get canvas of a black circle brush used for canvas to draw later @private @returns {Object} circle brush canvas
dataEach
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 updateHoverAnimation(path, symbolMeta) { path.off('emphasis').off('normal'); var scale = symbolMeta.symbolScale.slice(); symbolMeta.hoverAnimation && path .on('emphasis', function () { this.animateTo({ scale: [scale[0] * 1.1, scale[1] * 1.1] }, 400,...
Axis type - 'category' - 'value' - 'time' - 'log' @type {string}
updateHoverAnimation
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 createBar(data, opt, symbolMeta, isUpdate) { // bar is the main element for each data. var bar = new Group(); // bundle is used for location and clip. var bundle = new Group(); bar.add(bundle); bar.__pictorialBundle = bundle; bundle.attr('position', symbolMeta.bundlePosition.slice()...
Axis model @type {module:echarts/coord/single/AxisModel}
createBar
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 updateBar(bar, opt, symbolMeta) { var animationModel = symbolMeta.animationModel; var dataIndex = symbolMeta.dataIndex; var bundle = bar.__pictorialBundle; updateProps( bundle, {position: symbolMeta.bundlePosition.slice()}, animationModel, dataIndex ); if (symbolMeta.symbolRep...
Convert the global coord to local coord. designated by module:echarts/coord/single/Single. @type {Function}
updateBar
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 getShapeStr(data, symbolMeta) { return [ data.getItemVisual(symbolMeta.dataIndex, 'symbol') || 'none', !!symbolMeta.symbolRepeat, !!symbolMeta.symbolClip ].join(':'); }
Add it just for draw tooltip. @type {Array.<string>} @readOnly
getShapeStr
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
SingleAxis = 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 * - 't...
Get axis, add it just for draw tooltip. @return {[type]} [description]
SingleAxis
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 create$3(ecModel, api) { var singles = []; ecModel.eachComponent('singleAxis', function (axisModel, idx) { var single = new Single(axisModel, ecModel, api); single.name = 'single_' + idx; single.resize(axisModel, api); axisModel.coordinateSystem = single; singl...
@param {Object} opt {labelInside} @return {Object} { position, rotation, labelDirection, labelOffset, tickDirection, labelRotate, z2 }
create$3
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 getPointDimIndex(axis) { return axis.isHorizontal() ? 0 : 1; }
The raw data is divided into multiple layers and each layer has same name. @return {Array.<Array.<number>>}
getPointDimIndex
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 completeTreeValue$1(dataNode) { // Postorder travel tree. // If value of none-leaf node is not set, // calculate it by suming up the value of all children. var sum = 0; each$1(dataNode.children, function (child) { completeTreeValue$1(child); var childValue = child.value; ...
Sunburstce of Sunburst including Sector, Label, LabelLine @constructor @extends {module:zrender/graphic/Group}
completeTreeValue$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 getLabelAttr(name) { var stateAttr = labelModel.get(name); if (stateAttr == null) { return normalModel.get(name); } else { return stateAttr; } }
Get index of root in sorted order @param {TreeNode} node current node @return {number} index in root
getLabelAttr
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 handleRootToNode(model, index) { var targetInfo = retrieveTargetInfo(payload, [ROOT_TO_NODE_ACTION$1], model); if (targetInfo) { var originViewRoot = model.getViewRoot(); if (originViewRoot) { payload.direction = aboveViewRoot(originV...
Init node children by order and update visual @param {TreeNode} node root node @param {boolean} isAsc if is in ascendant order
handleRootToNode
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 handleHighlight(model, index) { var targetInfo = retrieveTargetInfo(payload, [HIGHLIGHT_ACTION], model); if (targetInfo) { payload.highlight = targetInfo.node; } }
Sort children nodes @param {TreeNode[]} children children of node to be sorted @param {string | function | null} sort sort method See SunburstSeries.js for details.
handleHighlight
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 updateEl(el, dataIndex, elOption, animatableModel, data, isInit, isRoot) { var transitionProps = {}; var elOptionStyle = elOption.style || {}; elOption.shape && (transitionProps.shape = clone(elOption.shape)); elOption.position && (transitionProps.position = elOption.position.slice()); elO...
By default, `visual` is applied to style (to support visualMap). `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`, it can be implemented as: `api.style({stroke: api.visual('color'), fill: null})`; @public @param {Object} [extra] @param {number} [dataIndexInside=currDataIndexInside]
updateEl
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 calRadialBar(barSeries, api) { // Columns info on each category axis. Key is polar name var columnsMap = {}; each$1(barSeries, function (seriesModel, idx) { var data = seriesModel.getData(); var polar = seriesModel.coordinateSystem; var baseAxis = polar.getBaseAxis(); ...
Only be called in category axis. Angle axis uses text height to decide interval @override @return {number} Auto interval for cateogry axis tick and label
calRadialBar
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 RadiusAxis(scale, radiusExtent) { Axis.call(this, 'radius', scale, radiusExtent); /** * Axis type * - 'category' * - 'value' * - 'time' * - 'log' * @type {string} */ this.type = 'category'; }
Get axes by type of scale @param {string} scaleType @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}
RadiusAxis
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 AngleAxis(scale, angleExtent) { angleExtent = angleExtent || [0, 360]; Axis.call(this, 'angle', scale, angleExtent); /** * Axis type * - 'category' * - 'value' * - 'time' * - 'log' * @type {string} */ this.type = 'category'; }
@param {string} [dim] 'radius' or 'angle' or 'auto' or null/undefined @return {Object} {baseAxes: [], otherAxes: []}
AngleAxis
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
Polar = function (name) { /** * @type {string} */ this.name = name || ''; /** * x of polar center * @type {number} */ this.cx = 0; /** * y of polar center * @type {number} */ this.cy = 0; /** * @type {module:echarts/coord/polar/RadiusAxis} ...
Get ring area of cartesian. Area will have a contain function to determine if a point is in the coordinate system. @return {Ring}
Polar
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 getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) { var axis = axisModel.axis; var coord = axis.dataToCoord(value); var axisAngle = polar.getAngleAxis().getExtent()[0]; axisAngle = axisAngle / 180 * Math.PI; var radiusExtent = polar.getRadiusAxis().getExtent(); va...
@type {module:echarts/coord/geo/Geo}
getLabelPosition
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 makeAction(method, actionInfo) { actionInfo.update = 'updateView'; registerAction(actionInfo, function (payload, ecModel) { var selected = {}; ecModel.eachComponent( { mainType: 'geo', query: payload}, function (geoModel) { geoModel[method](paylo...
Convert a (x, y) point to time data @override @param {string} point point @return {string} data
makeAction
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 Calendar(calendarModel, ecModel, api) { this._model = calendarModel; }
initRange @private @return {Array} [start, end]
Calendar
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
generateNewSeriesTypes = function (seriesModel) { var seriesType = seriesModel.subType; var seriesId = seriesModel.id; var newSeriesOpt = seriesOptGenreator[type]( seriesType, seriesId, seriesModel, model ); if (newSeriesOpt) { // PENDING If merge original...
@param {module:echarts/model/Global} @return {Object} @inner
generateNewSeriesTypes
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 axisDiffProcessor(axisNameIndex, values, refer, scales) { return [ values[0] - scales[axisNameIndex] * refer[0], values[1] - scales[axisNameIndex] * refer[1] ]; }
Iterate each dimension name. @public @param {Function} callback The parameter is like: { name: 'angle', capital: 'Angle', axis: 'angleAxis', axisIndex: 'angleAixs', ...
axisDiffProcessor
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 giveStore(ecModel) { var store = ecModel[ATTR$1]; if (!store) { store = ecModel[ATTR$1] = [{}]; } return store; }
@readOnly @type {module: echarts/model/Global}
giveStore
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 retrieveRawOption(option) { var ret = {}; each$19( ['start', 'end', 'startValue', 'endValue', 'throttle'], function (name) { option.hasOwnProperty(name) && (ret[name] = option[name]); } ); return ret; }
Find the first target coordinate system. @protected @return {Object} { grid: [ {model: coord0, axisModels: [axis1, axis3], coordIndex: 1}, {model: coord1, axisModels: [axis0, axis2], coordIndex: 0}, ... ], // cartesi...
retrieveRawOption
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 forEachComponent(mainType, cb) { var opts = option[mainType]; if (!isArray(opts)) { opts = opts ? [opts] : []; } each$16(opts, cb); }
@param {number} duration @return {string} @inner
forEachComponent
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 Restore(model) { this.model = model; }
@param {Object} tooltipModel @return {string} @inner
Restore
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 makeStyleCoord(out, zr, appendToBody, zrX, zrY) { var zrPainter = zr && zr.painter; if (appendToBody) { var zrViewportRoot = zrPainter && zrPainter.getViewportRoot(); if (zrViewportRoot) { // Some APPs might use scale on body, so we support CSS transform here. t...
@alias module:echarts/component/tooltip/TooltipRichContent @constructor
makeStyleCoord
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 TooltipContent(container, api, opt) { if (env$1.wxa) { return null; } var el = document.createElement('div'); el.domBelongToZr = true; this.el = el; var zr = this._zr = api.getZr(); var appendToBody = this._appendToBody = opt && opt.appendToBody; this._styleCoord = [0,...
Set tooltip content @param {string} content rich text string of content @param {Object} markerRich rich text style @param {Object} tooltipModel tooltip model
TooltipContent
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 isCenterAlign(align) { return align === 'center' || align === 'middle'; }
@param {Array.<string>} stateList @param {Object} visualMappings <state, Object.<visualType, module:echarts/visual/VisualMapping>> @param {module:echarts/data/List} list @param {Function} getValueState param: valueOrIndex, return: state. @param {object} [scope] Scope for getValueState @param {string} [dimension] Concre...
isCenterAlign
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
preprocessor$1 = function (option, isNew) { var brushComponents = option && option.brush; if (!isArray(brushComponents)) { brushComponents = brushComponents ? [brushComponents] : []; } if (!brushComponents.length) { return; } var brushComponentSpecifiedBtns = []; each$1(br...
@param {module:echarts/data/List} data @param {Array.<string>} stateList @param {Object} visualMappings <state, Object.<visualType, module:echarts/visual/VisualMapping>> @param {Function} getValueState param: valueOrIndex, return: state. @param {number} [dim] dimension or dimension index.
preprocessor$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 getVisual(key) { return data.getItemVisual(dataIndex, key); }
Layout for visual, the priority higher than other layout, and before brush visual.
getVisual
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 dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) { // This event will not be triggered when `setOpion`, otherwise dead lock may // triggered when do `setOption` in event listener, which we do not find // satisfactory way to solve yet. Some considered resolutions: // (a) ...
If ranges is null/undefined, range state remain. @param {Array.<Object>} [ranges]
dispatchAction
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 doDispatch(api, brushSelected) { if (!api.isDisposed()) { var zr = api.getZr(); zr[DISPATCH_FLAG] = true; api.dispatchAction({ type: 'brushSelect', batch: brushSelected }); zr[DISPATCH_FLAG] = false; } }
see module:echarts/component/helper/BrushController @param {Object} brushOption
doDispatch
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 toFixed(val) { return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20)); }
FIXME Do not publish to thirt-part-dev temporarily util the interface is stable. (Should it return a function but not visual meta?) @pubilc @abstract @param {Function} getColorVisual params: value, valueState return: color @return {Object} visualMeta should includes {stops, outerColors} out...
toFixed
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 setStop(value, valueState) { stops.push({ value: value, color: getColorVisual(value, valueState) }); }
@param {module:echarts/component/visualMap/VisualMapModel} visualMapModel\ @param {module:echarts/ExtensionAPI} api @param {Array.<number>} itemSize always [short, long] @return {string} 'left' or 'right' or 'top' or 'bottom'
setStop
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 getColorStopValues(visualMapModel, valueState, dataExtent) { if (dataExtent[0] === dataExtent[1]) { return dataExtent.slice(); } // When using colorHue mapping, it is not linear color any more. // Moreover, canvas gradient seems not to be accurate linear. // FIXME // Should be ...
Prepare dataIndex for outside usage, where dataIndex means rawIndex, and dataIndexInside means filtered index.
getColorStopValues
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
arrayDiff$1 = function (oldArr, newArr, callback) { return arrayDiff.diff(oldArr, newArr, callback); }
Update gradient. @param {Gradient} gradient zr gradient instance
arrayDiff$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 renderTaskReset(context) { var seriesModel = context.model; var ecModel = context.ecModel; var api = context.api; var payload = context.payload; // ???! remove updateView updateVisual var progressiveRender = seriesModel.pipelineContext.progressiveRender; var view = context.view; ...
Create throttle method or update throttle rate. @example ComponentView.prototype.render = function () { ... throttle.createOrUpdate( this, '_dispatchAction', this.model.get('throttle'), 'fixRate' ); }; ComponentView.prototype.remove = function () { throttle.clear(this, '...
renderTaskReset
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.simple.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.simple.js
Apache-2.0
dataSample = function (seriesType) { return { seriesType: seriesType, modifyOutputEnd: true, reset: function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var sampling = seriesModel.get('sampling'); var coordSys = seriesModel.coordinat...
@abstract @param {*} tick @return {string} label of the tick.
dataSample
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.simple.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.simple.js
Apache-2.0
function rotateTextRect(textRect, rotate) { var rotateRadians = rotate * Math.PI / 180; var boundingBox = textRect.plain(); var beforeWidth = boundingBox.width; var beforeHeight = boundingBox.height; var afterWidth = beforeWidth * Math.cos(rotateRadians) + beforeHeight * Math.sin(rotateRadians); ...
Base axis will be used on stacking. @return {module:echarts/coord/cartesian/Axis2D}
rotateTextRect
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.simple.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.simple.js
Apache-2.0
function getOptionCategoryInterval(model) { var interval = model.get('interval'); return interval == null ? 'auto' : interval; }
@param {Array.<number>} data @param {Array.<number>} out @return {Array.<number>}
getOptionCategoryInterval
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.simple.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.simple.js
Apache-2.0
function updateAxisTransform(axis, coordBase) { var axisExtent = axis.getExtent(); var axisExtentSum = axisExtent[0] + axisExtent[1]; // Fast transform axis.toGlobalCoord = axis.dim === 'x' ? function (coord) { return coord + coordBase; } : function (coord) { ...
A final axis is translated and rotated from a "standard axis". So opt.position and opt.rotation is required. A standard axis is and axis from [0, 0] to [0, axisExtent[1]], for example: (0, 0) ------------> (0, 50) nameDirection or tickDirection or labelDirection is 1 means tick or label is below the standard axis, wh...
updateAxisTransform
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts-en.simple.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts-en.simple.js
Apache-2.0
function prioritySortFunc(a, b) { return a.__prio - b.__prio; }
Get canvas which has all thing rendered @param {Object} opts @param {string} [opts.backgroundColor] @return {string}
prioritySortFunc
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function check(query, host, prop, propOnHost) { return query[prop] == null || host[propOnHost || prop] === query[prop]; }
@param {HTMLElement} dom @return {echarts~ECharts}
check
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function updateConnectedChartsStatus(charts, status) { for (var i = 0; i < charts.length; i++) { var otherChart = charts[i]; otherChart[STATUS_KEY] = status; } }
Usage: registerAction('someAction', 'someEvent', function () { ... }); registerAction('someAction', function () { ... }); registerAction( {type: 'someAction', event: 'someEvent', update: 'updateView'}, function () { ... } ); @param {(string|Object)} actionInfo @param {string} actionInfo.type @param {string} [a...
updateConnectedChartsStatus
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function registerVisual(priority, visualTask) { normalizeRegister(visualFuncs, priority, visualTask, PRIORITY_VISUAL_CHART, 'visual'); }
@param {Array} oldArr @param {Array} newArr @param {Function} oldKeyGetter @param {Function} newKeyGetter @param {Object} [context] Can be visited by this.context in callback.
registerVisual
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function summarizeDimensions(data) { var summary = {}; var encode = summary.encode = {}; var notExtraCoordDimMap = createHashMap(); var defaultedLabel = []; var defaultedTooltip = []; // See the comment of `List.js#userOutput`. var userOutput = summary.userOutput = { dimensionNames:...
The origin name in dimsDef, see source helper. If displayName given, the tooltip will displayed vertically. Optional. @type {string}
summarizeDimensions
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function cloneListForMapAndSample(original, excludeDimensions) { var allDimensions = original.dimensions; var list = new List( map(allDimensions, original.getDimensionInfo, original), original.hostModel ); // FIXME If needs stackedOn, value may already been stacked transferProperties...
Get model of one data item. @param {number} idx
cloneListForMapAndSample
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function getCoordSysInfoBySeries(seriesModel) { var coordSysName = seriesModel.get('coordinateSystem'); var result = new CoordSysInfo(coordSysName); var fetch = fetchers[coordSysName]; if (fetch) { fetch(seriesModel, result, result.axisMap, result.categoryAxisMap); return result; } }
Note that it is too complicated to support 3d stack by value (have to create two-dimension inverted index), so in 3d case we just support that stacked by index. @param {module:echarts/model/Series} seriesModel @param {Array.<string|Object>} dimensionInfoList The same as the input of <module:echarts/data/List>. ...
getCoordSysInfoBySeries
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function getStackedDimension(data, targetDim) { return isDimensionStacked(data, targetDim) ? data.getCalculationInfo('stackResultDimension') : targetDim; }
Parse input val to valid inner number. @param {*} val @return {number}
getStackedDimension
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function isNeedCompleteOrdinalData(source) { if (source.sourceFormat === SOURCE_FORMAT_ORIGINAL) { var sampleItem = firstDataNotNull(source.data || []); return sampleItem != null && !isArray(getDataItemValue(sampleItem)); } }
@param {module:echarts/model/Model} axisModel @return {module:echarts/data/OrdinalMeta}
isNeedCompleteOrdinalData
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function getName(obj) { if (isObject$1(obj) && obj.value != null) { return obj.value; } else { return obj + ''; } }
@param {number} interval @return {number} interval precision
getName
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function doCalBarWidthAndOffset(seriesInfoList) { // Columns info on each category axis. Key is cartesian name var columnsMap = {}; each$1(seriesInfoList, function (seriesInfo, idx) { var axisKey = seriesInfo.axisKey; var bandWidth = seriesInfo.bandWidth; var columnsOnAxis = columns...
@param {Object} barWidthAndOffset The result of makeColumnLayout @param {module:echarts/coord/Axis} axis @param {module:echarts/model/Series} [seriesModel] If not provided, return all. @return {Object} {stackId: {offset, width}} or {offset, width} if seriesModel provided.
doCalBarWidthAndOffset
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
bisect = function (a, x, lo, hi) { while (lo < hi) { var mid = lo + hi >>> 1; if (a[mid][1] < x) { lo = mid + 1; } else { hi = mid; } } return lo; }
@param {module:echarts/model/Model} @return {module:echarts/scale/Time}
bisect
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function makeLabelsByNumericCategoryInterval(axis, categoryInterval, onlyTick) { var labelFormatter = makeLabelFormatter(axis); var ordinalScale = axis.scale; var ordinalExtent = ordinalScale.getExtent(); var labelModel = axis.getLabelModel(); var result = []; // TODO: axisType: ordinalTime, pi...
Convert data to coord. Data is the rank if it has an ordinal scale @param {number} data @param {boolean} clamp @return {number}
makeLabelsByNumericCategoryInterval
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function progress(params, data) { var segCount = params.end - params.start; var points = isLargeRender && new Float32Array(segCount * dimLen); for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) { var point; ...
@alias module:echarts/coord/Cartesian @constructor
progress
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
Cartesian = function (name) { this._axes = {}; this._dimList = []; /** * @type {string} */ this.name = name || ''; }
Get rect area of cartesian. Area will have a contain function to determine if a point is in the coordinate system. @return {BoundingRect}
Cartesian
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function buildAxisMinorTicks(axisBuilder, axisModel, opt) { var axis = axisModel.axis; var minorTickModel = axisModel.getModel('minorTick'); if (!minorTickModel.get('show') || axis.scale.isBlank()) { return; } var minorTicksCoords = axis.getMinorTicksCoords(); if (!minorTicksCoords.le...
key: makeKey(axis.model) value: { axis, coordSys, axisPointerModel, triggerTooltip, involveSeries, snap, seriesModels, seriesDataCount }
buildAxisMinorTicks
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function collectSeriesInfo(result, ecModel) { // Prepare data for axis trigger ecModel.eachSeries(function (seriesModel) { // Notice this case: this coordSys is `cartesian2D` but not `grid`. var coordSys = seriesModel.coordinateSystem; var seriesTooltipTrigger = seriesModel.get('tooltip...
Action handler. @public @param {module:echarts/coord/cartesian/AxisModel} axisModel @param {module:echarts/model/Global} ecModel @param {module:echarts/ExtensionAPI} api @param {Object} payload
collectSeriesInfo
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function Line$1(lineData, idx, seriesScope) { Group.call(this); this._createLine(lineData, idx, seriesScope); }
@alias module:echarts/component/marker/LineDraw @constructor
Line$1
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function setMinMaxSpan(axisProxy) { var minMaxSpan = axisProxy._minMaxSpan = {}; var dataZoomModel = axisProxy._dataZoomModel; var dataExtent = axisProxy._dataExtent; each$13(['min', 'max'], function (minMax) { var percentSpan = dataZoomModel.get(minMax + 'Span'); var valueSpan = dataZo...
Suppose a "main process" start at the point that model prepared (that is, model initialized or merged or method called in `action`). We should keep the `main process` idempotent, that is, given a set of values on `option`, we get the same result. But sometimes, values on `option` will be updated for providing users a ...
setMinMaxSpan
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function DataView(model) { this._dom = null; this.model = model; }
@type {module:zrender/zrender~ZRender} @private
DataView
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function close() { container.removeChild(root); self._dom = null; }
If set to null/undefined/false, select disabled. @param {Object} brushOption @param {string|boolean} brushOption.brushType 'line', 'rect', 'polygon' or false If passing false/null/undefined, disable brush. If passing 'auto', determined by panel.defaultBrushType. ...
close
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function formatMinMax(minMax) { minMax[0] > minMax[1] && minMax.reverse(); return minMax; }
@param {module:echarts/model/Global} ecModel @param {Object} newSnapshot {dataZoomId, batch: [payloadInfo, ...]}
formatMinMax
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function removeOldTextNode(el) { if (el && el.__textSvgEl) { // textSvgEl may has no parentNode if el has been removed temporary. if (el.__textSvgEl.parentNode) { el.__textSvgEl.parentNode.removeChild(el.__textSvgEl); } el.__textSvgEl = null; el.__tspanList = []; ...
Get the <defs> tag for svgRoot; optionally creates one if not exists. @param {boolean} isForceCreating if need to create when not exists @return {SVGDefsElement} SVG <defs> element, null if it doesn't exist and isForceCreating is false
removeOldTextNode
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.common.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.common.js
Apache-2.0
function cloneShallowInjection(opt, res) { // cloneShallow, which brings about some fragilities, may be inappropriate // to be exposed as an API. So for implementation simplicity we can make // the restriction that cloneShallow of not-mainData should not be invoked // outside, but only be invoked here. ...
@param {boolean} includeSelf Default false. @return {Array.<module:echarts/data/Tree~TreeNode>} order: [root, child, grandchild, ...]
cloneShallowInjection
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function Breadcrumb(containerGroup) { /** * @private * @type {module:zrender/container/Group} */ this.group = new Group(); containerGroup.add(this.group); }
Caution: a el can only be added once, otherwise 'done' might not be called. This method checks this (by el.id), suppresses adding and returns false when existing el found. @param {modele:zrender/Element} el @param {Object} target @param {number} [time=500] @param {number} [delay=0] @param {string} [easing='linear'] @r...
Breadcrumb
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function squarify(node, options, hideChildren, depth) { var width; var height; if (node.isRemoved()) { return; } var thisLayout = node.getLayout(); width = thisLayout.width; height = thisLayout.height; // Considering border and gap var nodeModel = node.getModel(); var ...
Computes the score for the specified row, as the worst aspect ratio.
squarify
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function mergeAxisOptionFromParallel(option) { var axes = normalizeToArray(option.parallelAxis); each$1(axes, function (axisOption) { if (!isObject$1(axisOption)) { return; } var parallelIndex = axisOption.parallelIndex || 0; var parallelOption = normalizeToArray(op...
Parallel Coordinates <https://en.wikipedia.org/wiki/Parallel_coordinates>
mergeAxisOptionFromParallel
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function isAnimationEnabled() { // `animation` prop can be set on itemModel in pictorial bar chart. return this.parentModel.isAnimationEnabled() && !!this.getShallow('animation'); }
Axis orient - 'horizontal' - 'vertical' @type {[type]}
isAnimationEnabled
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function makeMapperParam(axisInfo) { var axisModel = axisInfo.axis.model; var item = {}; var dim = item.axisDim = axisInfo.axis.dim; item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex; item.axisName = item[dim + 'AxisName'] = axisModel.name; item.axisId = item[dim + 'AxisId'] = ...
@param {string} key @param {module:echarts/ExtensionAPI} api
makeMapperParam
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function getGlobalExtent(coordSys, dimIndex) { var rect = coordSys.getRect(); return [rect[XY[dimIndex]], rect[XY[dimIndex]] + rect[WH[dimIndex]]]; }
Get data indices for show tooltip content @param {Array.<string>|string} dim single coordinate dimension @param {number} value axis value @param {module:echarts/coord/single/SingleAxis} baseAxis single Axis used the themeRiver. @return {Object} {dataIndices, nestestValue}
getGlobalExtent
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function computeBaseline(data) { var layerNum = data.length; var pointNum = data[0].length; var sums = []; var y0 = []; var max = 0; var temp; var base = {}; for (var i = 0; i < pointNum; ++i) { for (var j = 0, temp = 0; j < layerNum; ++j) { temp += data[j][i][1]; ...
@param {module:echarts/data/Tree~Node} [viewRoot]
computeBaseline
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function createPageButton(name, iconIdx) { var pageDataIndexName = name + 'DataIndex'; var icon = createIcon( legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], { // Buttons will be created in each render, so we do not n...
@param {module:echarts/model/Model} legendModel @return {Object} { contentPosition: Array.<number>, null when data item not found. pageIndex: number, null when data item not found. pageCount: number, always be a number, can be 0. pagePrevDataIndex: number, null when no previous page. pageNextDataIndex: number, nul...
createPageButton
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
getFontStyle = function (fontString) { var fontStyle = fontStyleCache[fontString]; if (!fontStyle) { // Clear cache if (fontStyleCacheCount > MAX_FONT_CACHE_SIZE) { fontStyleCacheCount = 0; fontStyleCache = {}; } var style ...
VML Painter. @module zrender/vml/Painter
getFontStyle
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/echarts.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/echarts.js
Apache-2.0
function parse(xml) { var doc; if (typeof xml === 'string') { var parser = new DOMParser(); doc = parser.parseFromString(xml, 'text/xml'); } else { doc = xml; } if (!doc || doc.getElementsByTagName('parsererror').length) { return null; } var gexfRoot = ge...
This is a parse of GEXF. The spec of GEXF: https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf
parse
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/extension/dataTool.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/extension/dataTool.js
Apache-2.0
prepareBoxplotData = function (rawData, opt) { opt = opt || []; var boxData = []; var outliers = []; var axisData = []; var boundIQR = opt.boundIQR; var useExtreme = boundIQR === 'none' || boundIQR === 0; for (var i = 0; i < rawData.length; i++) { axisData.push(i + ''); var ...
See: <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2> <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html> Helper method for preparing data. @param {Array.<number>} rawData like [ [12,232,443], (raw data set for the first box) [384...
prepareBoxplotData
javascript
douyu/juno
assets/public/js/echarts/v4.7.0/extension/dataTool.js
https://github.com/douyu/juno/blob/master/assets/public/js/echarts/v4.7.0/extension/dataTool.js
Apache-2.0
minimist = function (args, opts) { if (!opts) opts = {}; var flags = { bools: {}, strings: {}, unknownFn: null }; if (typeof opts['unknown'] === 'function') { flags.unknownFn = opts['unknown']; } if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { flags.allBools = true; } ...
Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The order of grouped values is determined by the order they occur in `collection`. The corresponding value of each key is an array of elements responsible for generating the key. The iteratee is invoke...
minimist
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
function unixify(filepath) { return filepath.replace(/\\/g, '/'); }
Designed to work only with simple paths: `dir\\file`.
unixify
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
globParent = function globParent(str, opts) { var options = Object.assign({ flipBackslashes: true }, opts); // flip windows path separators if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { str = str.replace(backslash, slash); } // special case for strings ending in enclosure containi...
@param {string} str @param {Object} opts @param {boolean} [opts.flipBackslashes=true]
globParent
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
function rangeToPattern(start, stop, options) { if (start === stop) { return { pattern: start, count: [], digits: 0 }; } let zipped = zip(start, stop); let digits = zipped.length; let pattern = ''; let count = 0; for (let i = 0; i < digits; i++) { let [startDigit, stopDigit...
Convert a range to a regex pattern @param {Number} `start` @param {Number} `stop` @return {String}
rangeToPattern
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
braces = (input, options = {}) => { let output = []; if (Array.isArray(input)) { for (let pattern of input) { let result = braces.create(pattern, options); if (Array.isArray(result)) { output.push(...result); } else { output.push(result); } } } else { output =...
Expand the given pattern or create a regex-compatible string. ```js const braces = require('braces'); console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] ``` @param {String} `str` @param {Object} `options` @return {String} @api public
braces
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
scan = (input, options) => { const opts = options || {}; const length = input.length - 1; const scanToEnd = opts.parts === true || opts.scanToEnd === true; const slashes = []; const tokens = []; const parts = []; let str = input; let index = -1; let start = 0; let lastIndex = 0; let isBrace = fals...
Quickly scans a glob pattern and returns an object with a handful of useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), `glob` (the actual pattern), and `negated` (true if the path starts with `!`). ```js const pm = require('picomatch'); console.log(pm.scan('foo/bar/*.js')); { isGlob: true,...
scan
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
create = str => { switch (str) { case '*': return `${nodot}${ONE_CHAR}${star}`; case '.*': return `${DOT_LITERAL}${ONE_CHAR}${star}`; case '*.*': return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; case '*/*': return `${nodot}${star}${SLASH_LITERAL}${...
/` while (rest.slice(0, 3) === '/**') { const after = input[state.index + 4]; if (after && after !== '/') { break; } rest = rest.slice(3); consume('/**', 3); } if (prior.type === 'bos' && eos()) { prev.type = 'globstar'; prev.value...
create
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
micromatch = (list, patterns, options) => { patterns = [].concat(patterns); list = [].concat(list); let omit = new Set(); let keep = new Set(); let items = new Set(); let negatives = 0; let onResult = state => { items.add(state.output); if (options && options.onResult) { options.onResult(s...
Returns an array of strings that match one or more glob patterns. ```js const mm = require('micromatch'); // mm(list, patterns[, options]); console.log(mm(['a.js', 'a.txt'], ['*.js'])); //=> [ 'a.js' ] ``` @param {String|Array<string>} list List of strings to match. @param {String|Array<string>} patterns One or more ...
micromatch
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
function convertToPositivePattern(pattern) { return isNegativePattern(pattern) ? pattern.slice(1) : pattern; }
When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check filepath directly (without read directory).
convertToPositivePattern
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
constructor(name, stats) { this.name = name; this.isBlockDevice = stats.isBlockDevice.bind(stats); this.isCharacterDevice = stats.isCharacterDevice.bind(stats); this.isDirectory = stats.isDirectory.bind(stats); this.isFIFO = stats.isFIFO.bind(stats); this.isFile = stats.isFile.bind(s...
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
_getPatternSegments(pattern) { const parts = utils$2.pattern.getPatternParts(pattern, this._micromatchOptions); return parts.map(part => { const dynamic = utils$2.pattern.isDynamicPattern(part, this._settings); if (!dynamic) { return { dynamic: false, patte...
The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). So, before expand patterns with brace expansion into separated patterns.
_getPatternSegments
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
constructor(_settings, _micromatchOptions) { this._settings = _settings; this._micromatchOptions = _micromatchOptions; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
function generateTasks(source, options) { assertPatternsInput(source); const patterns = [].concat(source); const settings = new settings$3.default(options); return tasks.generate(patterns, settings); }
The stream returned by the provider cannot work with an asynchronous iterator. To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. This affects performance (+25%). I don't see best solution right now.
generateTasks
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
function getSupportedFilesGlob() { if (!supportedFilesGlob) { const extensions = flatten_1(context.languages.map(lang => lang.extensions || [])); const filenames = flatten_1(context.languages.map(lang => lang.filenames || [])); supportedFilesGlob = `**/{${extensions.map(ext => "*" + (ext[0] === "....
@type {Array<{ type: 'file' | 'dir' | 'glob'; glob: string; input: string; }>}
getSupportedFilesGlob
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0
function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) { return path.relative(cwd, absolutePath).split(path.sep).some(dir => ignoredDirectories[dir]); }
@param {string} absolutePath @param {string} cwd @param {Record<string, boolean>} ignoredDirectories
containsIgnoredPathSegment
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/bin-prettier.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/bin-prettier.js
Apache-2.0