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

Merge pull request #6006 from zhuangzhuang/master

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