提交 da8cbbe9 编写于 作者: S sushuang 提交者: GitHub

Merge pull request #6006 from zhuangzhuang/master

fix some doc bugs.
......@@ -425,7 +425,7 @@ define(function (require) {
path.__pictorialRepeatTimes = repeatTimes;
bundle.add(path);
var target = makeTarget(index, true);
var target = makeTarget(index);
updateAttr(
path,
......
......@@ -47,7 +47,7 @@ define(function (require) {
if (opts.sort && opts.sort != 'none') {
groups.sort(compareGroups);
if (opts.sort === 'descending') {
groups.revert();
groups.reverse();
}
}
......@@ -58,7 +58,7 @@ define(function (require) {
if (opts.sortSub && opts.sortSub != 'none') {
group.subGroups.sort(compareGroups);
if (opts.sortSub === 'descending') {
group.subGroups.revert();
group.subGroups.reverse();
}
}
......
......@@ -296,7 +296,7 @@ define(function (require) {
/**
* @public
* @param {nubmer|string} dim
* @param {number|string} dim
* @param {number} [dataIndexInside=currDataIndexInside]
* @return {number|string} value
*/
......
......@@ -112,7 +112,7 @@ define(function (require) {
// Must reinitialize effect if following configuration changed
var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale'];
for (var i = 0; i < DIFFICULT_PROPS; i++) {
for (var i = 0; i < DIFFICULT_PROPS.length; i++) {
var propName = DIFFICULT_PROPS[i];
if (oldEffectCfg[propName] !== effectCfg[propName]) {
this.stopEffectAnimation();
......
......@@ -144,7 +144,7 @@ define(function (require) {
* @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 {numbber} nodeGap the vertical distance between two nodes
* @param {number} nodeGap the vertical distance between two nodes
* in the same column.
* @param {number} iterations the number of iterations for the algorithm
*/
......
......@@ -103,7 +103,7 @@ define(function (require) {
* Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics
*
* @param {Array.<Array>} data the points in each layer
* @return {Array}
* @return {Object}
*/
function computeBaseline(data) {
var layerNum = data.length;
......
......@@ -476,7 +476,8 @@ define(function(require) {
if (zrUtil.isObject(lastProps) && zrUtil.isObject(newProps)) {
var equals = true;
zrUtil.each(newProps, function (item, key) {
equals &= propsEqual(lastProps[key], item);
// ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators
equals = equals && propsEqual(lastProps[key], item);
});
return !!equals;
}
......
......@@ -200,7 +200,7 @@ define(function(require) {
*
* @param {Object} area
* @param {Array} targetInfoList
* @return {Obejct|boolean}
* @return {Object|boolean}
*/
proto.findTargetInfo = function (area, ecModel) {
var targetInfoList = this._targetInfoList;
......
......@@ -120,7 +120,7 @@ define(function (require) {
/**
* @param {module:echarts/model/Global}
* @return {string}
* @return {Object}
* @inner
*/
function getContentFromModel(ecModel) {
......@@ -157,7 +157,7 @@ define(function (require) {
var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');
/**
* @param {string} tsv
* @return {Array.<Object>}
* @return {Object}
*/
function parseTSVContents(tsv) {
var tsvLines = tsv.split(/\n+/g);
......
......@@ -532,7 +532,7 @@ define(function (require) {
},
/**
* @param {string|Function|Array.<number>} positionExpr
* @param {string|Function|Array.<number>|Object} positionExpr
* @param {number} x Mouse x
* @param {number} y Mouse y
* @param {boolean} confine Whether confine tooltip content in view rect.
......
......@@ -256,7 +256,7 @@ define(function (require) {
/**
* Convert a (x, y) point to time date
*
* @param {string} point point
* @param {Array} point point
* @return {Object} date
*/
pointToDate: function (point) {
......
......@@ -190,7 +190,7 @@ define(function(require, factory) {
/**
* @param {string} axisType
* @param {ndumber} [axisIndex]
* @param {number} [axisIndex]
*/
gridProto.getAxis = function (axisType, axisIndex) {
var axesMapOnDim = this._axesMap[axisType];
......
......@@ -983,7 +983,7 @@ define(function (require) {
/**
* Set layout property.
* @param {string} key
* @param {string|Object} key
* @param {*} [val]
*/
listProto.setLayout = function (key, val) {
......
......@@ -405,7 +405,7 @@ define(function(require) {
* }
*
* @static
* @param {Objec} dataRoot Root node.
* @param {Object} dataRoot Root node.
* @param {module:echarts/model/Model} hostModel
* @param {Array.<Object>} levelOptions
* @return module:echarts/data/Tree
......
......@@ -114,7 +114,7 @@ define(function (require) {
*/
this.group;
/**
* @type {HTMLDomElement}
* @type {HTMLElement}
* @private
*/
this._dom = dom;
......@@ -228,7 +228,7 @@ define(function (require) {
}
};
/**
* @return {HTMLDomElement}
* @return {HTMLElement}
*/
echartsProto.getDom = function () {
return this._dom;
......@@ -1564,7 +1564,7 @@ define(function (require) {
}
/**
* @param {HTMLDomElement} dom
* @param {HTMLElement} dom
* @param {Object} [theme]
* @param {Object} opts
* @param {number} [opts.devicePixelRatio] Use window.devicePixelRatio by default
......@@ -1681,7 +1681,7 @@ define(function (require) {
};
/**
* @param {HTMLDomElement} dom
* @param {HTMLElement} dom
* @return {echarts~ECharts}
*/
echarts.getInstanceByDom = function (dom) {
......
......@@ -45,12 +45,12 @@ define(function (require) {
* [4, 3, 2] => [4, 3, 2, 3]
* @param {number|Array.<number>} val
*/
formatUtil.normalizeCssArray = function (val) {
var len = val.length;
formatUtil.normalizeCssArray = function (val) {
if (typeof (val) === 'number') {
return [val, val, val, val];
}
else if (len === 2) {
var len = val.length;
if (len === 2) {
// vertical | horizontal
return [val[0], val[1], val[0], val[1]];
}
......
......@@ -471,7 +471,7 @@ define(function (require) {
/**
* @public
* @param {Object} obj
* @return {Oject} new object containers visual values.
* @return {Object} new object containers visual values.
* If no visuals, return null.
*/
VisualMapping.retrieveVisuals = function (obj) {
......
......@@ -26,7 +26,7 @@
], function (echarts) {
var chart = echarts.init(document.getElementById('main'));
chart.setOption({
chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
......@@ -36,7 +36,7 @@
series: [{
name: 'chord',
type: 'chord',
sort: 'ascending',
sort: 'descending',
data : [
{name : 'group1'},
{name : 'group2'},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册