提交 1d14fb2b 编写于 作者: K kener

重新打包近期更新,2.1.8 (beta 0.3) fix #889

上级 85c99e0f
因为 它太大了无法显示 source diff 。你可以改为 查看blob
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -1576,8 +1576,10 @@ define('echarts/chart/map', [
} else {
this._buildItem();
}
for (var i = 0, l = this.shapeList.length; i < l; i++) {
this.zr.addShape(this.shapeList[i]);
if (this.dataRangeOption.show) {
for (var i = 0, l = this.shapeList.length; i < l; i++) {
this.zr.addShape(this.shapeList[i]);
}
}
this._syncShapeFromRange();
},
......@@ -2555,7 +2557,7 @@ define('echarts/chart/map', [
return;
},
__onhoverlink: function (param) {
if (this.dataRangeOption.hoverLink && this._indicatorShape && param && param.seriesIndex != null && param.dataIndex != null) {
if (this.dataRangeOption.show && this.dataRangeOption.hoverLink && this._indicatorShape && param && param.seriesIndex != null && param.dataIndex != null) {
var curValue = param.value;
if (isNaN(curValue)) {
return;
......@@ -2726,6 +2728,9 @@ define('echarts/chart/map', [
RoamController.prototype = {
type: ecConfig.COMPONENT_TYPE_ROAMCONTROLLER,
_buildShape: function () {
if (!this.rcOption.show) {
return;
}
this._itemGroupLocation = this._getItemGroupLocation();
this._buildBackground();
this._buildItem();
......
......@@ -293,7 +293,7 @@ define('echarts/chart/pie', [
x = centerX;
y = centerY;
textAlign = 'center';
} else if (labelControl.position === 'inner') {
} else if (labelControl.position === 'inner' || labelControl.position === 'inside') {
radius = (radius[0] + radius[1]) / 2;
x = Math.round(centerX + radius * zrMath.cos(midAngle, true));
y = Math.round(centerY - radius * zrMath.sin(midAngle, true));
......@@ -305,7 +305,7 @@ define('echarts/chart/pie', [
y = Math.round(centerY - radius * zrMath.sin(midAngle, true));
textAlign = midAngle >= 90 && midAngle <= 270 ? 'right' : 'left';
}
if (labelControl.position != 'center' && labelControl.position != 'inner') {
if (labelControl.position != 'center' && labelControl.position != 'inner' && labelControl.position != 'inside') {
x += textAlign === 'left' ? 20 : -20;
}
data.__labelX = x - (textAlign === 'left' ? 5 : -5);
......@@ -411,7 +411,7 @@ define('echarts/chart/pie', [
var leftList = [];
var rightList = [];
for (var i = 0, l = sList.length; i < l; i++) {
if (sList[i]._labelPosition === 'outer') {
if (sList[i]._labelPosition === 'outer' || sList[i]._labelPosition === 'outside') {
sList[i]._rect._y = sList[i]._rect.y;
if (sList[i]._rect.x < center[0]) {
leftList.push(sList[i]);
......
......@@ -394,8 +394,10 @@ define('echarts/chart/scatter', [
} else {
this._buildItem();
}
for (var i = 0, l = this.shapeList.length; i < l; i++) {
this.zr.addShape(this.shapeList[i]);
if (this.dataRangeOption.show) {
for (var i = 0, l = this.shapeList.length; i < l; i++) {
this.zr.addShape(this.shapeList[i]);
}
}
this._syncShapeFromRange();
},
......@@ -1373,7 +1375,7 @@ define('echarts/chart/scatter', [
return;
},
__onhoverlink: function (param) {
if (this.dataRangeOption.hoverLink && this._indicatorShape && param && param.seriesIndex != null && param.dataIndex != null) {
if (this.dataRangeOption.show && this.dataRangeOption.hoverLink && this._indicatorShape && param && param.seriesIndex != null && param.dataIndex != null) {
var curValue = param.value;
if (isNaN(curValue)) {
return;
......
......@@ -1246,6 +1246,7 @@ define('echarts/echarts', [
subtextStyle: { color: '#aaa' }
},
legend: {
show: true,
orient: 'horizontal',
x: 'center',
y: 'top',
......@@ -1260,6 +1261,7 @@ define('echarts/echarts', [
selectedMode: true
},
dataRange: {
show: true,
orient: 'vertical',
x: 'left',
y: 'bottom',
......@@ -1411,6 +1413,7 @@ define('echarts/echarts', [
borderColor: '#ccc'
},
categoryAxis: {
show: true,
position: 'bottom',
name: '',
nameLocation: 'end',
......@@ -1461,6 +1464,7 @@ define('echarts/echarts', [
}
},
valueAxis: {
show: true,
position: 'left',
name: '',
nameLocation: 'end',
......@@ -1605,7 +1609,7 @@ define('echarts/echarts', [
currentIndex: 0
},
roamController: {
show: false,
show: true,
x: 'left',
y: 'top',
width: 80,
......@@ -1754,7 +1758,7 @@ define('echarts/echarts', [
borderWidth: 1,
label: {
show: true,
position: 'inside'
position: 'outer'
},
labelLine: {
show: true,
......@@ -1841,8 +1845,10 @@ define('echarts/echarts', [
position: 'inside'
},
nodeStyle: {
borderColor: '#5182ab',
borderWidth: 1
brushType: 'both',
color: '#f08c2e',
strokeColor: '#5182ab',
lineWidth: 1
},
linkStyle: {
color: '#5182ab',
......@@ -4370,6 +4376,7 @@ define('zrender/zrender', [
params.push({
seriesIndex: seriesIndex[i],
seriesName: seriesArray[i].name || '',
series: seriesArray[i],
dataIndex: dataIndex,
data: data,
name: categoryAxis.getNameByIndex(dataIndex),
......@@ -4471,6 +4478,7 @@ define('zrender/zrender', [
params.push({
seriesIndex: seriesIndex[i],
seriesName: seriesArray[i].name || '',
series: seriesArray[i],
dataIndex: dataIndex,
data: data,
name: data.name,
......@@ -4572,6 +4580,7 @@ define('zrender/zrender', [
this._tDom.innerHTML = formatter.call(this.myChart, {
seriesIndex: ecData.get(this._curTarget, 'seriesIndex'),
seriesName: serie.name || '',
series: serie,
dataIndex: dataIndex,
data: data,
name: name,
......@@ -5143,6 +5152,9 @@ define('zrender/zrender', [
Legend.prototype = {
type: ecConfig.COMPONENT_TYPE_LEGEND,
_buildShape: function () {
if (!this.legendOption.show) {
return;
}
this._itemGroupLocation = this._getItemGroupLocation();
this._buildBackground();
this._buildItem();
......@@ -13337,7 +13349,12 @@ define('zrender/zrender', [
return finalTextStyle.fontStyle + ' ' + finalTextStyle.fontWeight + ' ' + finalTextStyle.fontSize + 'px ' + finalTextStyle.fontFamily;
},
getItemStyleColor: function (itemColor, seriesIndex, dataIndex, data) {
return typeof itemColor === 'function' ? itemColor(seriesIndex, dataIndex, data) : itemColor;
return typeof itemColor === 'function' ? itemColor.call(this.myChart, {
seriesIndex: seriesIndex,
series: this.series[seriesIndex],
dataIndex: dataIndex,
data: data
}) : itemColor;
},
subPixelOptimize: function (position, lineWidth) {
if (lineWidth % 2 === 1) {
......@@ -18800,6 +18817,9 @@ define('zrender/zrender', [
},
_buildShape: function () {
this._interval = this._getInterval();
if (!this.option.show) {
return;
}
this.option.splitArea.show && this._buildSplitArea();
this.option.splitLine.show && this._buildSplitLine();
this.option.axisLine.show && this._buildAxisLine();
......@@ -19196,7 +19216,7 @@ define('zrender/zrender', [
_buildShape: function () {
this._hasData = false;
this._calculateValue();
if (!this._hasData) {
if (!this._hasData || !this.option.show) {
return;
}
this.option.splitArea.show && this._buildSplitArea();
......@@ -21889,8 +21909,10 @@ define('zrender/zrender', [
} else {
this._buildItem();
}
for (var i = 0, l = this.shapeList.length; i < l; i++) {
this.zr.addShape(this.shapeList[i]);
if (this.dataRangeOption.show) {
for (var i = 0, l = this.shapeList.length; i < l; i++) {
this.zr.addShape(this.shapeList[i]);
}
}
this._syncShapeFromRange();
},
......@@ -22868,7 +22890,7 @@ define('zrender/zrender', [
return;
},
__onhoverlink: function (param) {
if (this.dataRangeOption.hoverLink && this._indicatorShape && param && param.seriesIndex != null && param.dataIndex != null) {
if (this.dataRangeOption.show && this.dataRangeOption.hoverLink && this._indicatorShape && param && param.seriesIndex != null && param.dataIndex != null) {
var curValue = param.value;
if (isNaN(curValue)) {
return;
......@@ -23607,7 +23629,7 @@ define('zrender/zrender', [
x = centerX;
y = centerY;
textAlign = 'center';
} else if (labelControl.position === 'inner') {
} else if (labelControl.position === 'inner' || labelControl.position === 'inside') {
radius = (radius[0] + radius[1]) / 2;
x = Math.round(centerX + radius * zrMath.cos(midAngle, true));
y = Math.round(centerY - radius * zrMath.sin(midAngle, true));
......@@ -23619,7 +23641,7 @@ define('zrender/zrender', [
y = Math.round(centerY - radius * zrMath.sin(midAngle, true));
textAlign = midAngle >= 90 && midAngle <= 270 ? 'right' : 'left';
}
if (labelControl.position != 'center' && labelControl.position != 'inner') {
if (labelControl.position != 'center' && labelControl.position != 'inner' && labelControl.position != 'inside') {
x += textAlign === 'left' ? 20 : -20;
}
data.__labelX = x - (textAlign === 'left' ? 5 : -5);
......@@ -23725,7 +23747,7 @@ define('zrender/zrender', [
var leftList = [];
var rightList = [];
for (var i = 0, l = sList.length; i < l; i++) {
if (sList[i]._labelPosition === 'outer') {
if (sList[i]._labelPosition === 'outer' || sList[i]._labelPosition === 'outside') {
sList[i]._rect._y = sList[i]._rect.y;
if (sList[i]._rect.x < center[0]) {
leftList.push(sList[i]);
......@@ -29009,6 +29031,9 @@ define('zrender/zrender', [
RoamController.prototype = {
type: ecConfig.COMPONENT_TYPE_ROAMCONTROLLER,
_buildShape: function () {
if (!this.rcOption.show) {
return;
}
this._itemGroupLocation = this._getItemGroupLocation();
this._buildBackground();
this._buildItem();
......@@ -2784,6 +2784,7 @@ define('echarts/echarts', [
subtextStyle: { color: '#aaa' }
},
legend: {
show: true,
orient: 'horizontal',
x: 'center',
y: 'top',
......@@ -2798,6 +2799,7 @@ define('echarts/echarts', [
selectedMode: true
},
dataRange: {
show: true,
orient: 'vertical',
x: 'left',
y: 'bottom',
......@@ -2949,6 +2951,7 @@ define('echarts/echarts', [
borderColor: '#ccc'
},
categoryAxis: {
show: true,
position: 'bottom',
name: '',
nameLocation: 'end',
......@@ -2999,6 +3002,7 @@ define('echarts/echarts', [
}
},
valueAxis: {
show: true,
position: 'left',
name: '',
nameLocation: 'end',
......@@ -3143,7 +3147,7 @@ define('echarts/echarts', [
currentIndex: 0
},
roamController: {
show: false,
show: true,
x: 'left',
y: 'top',
width: 80,
......@@ -3292,7 +3296,7 @@ define('echarts/echarts', [
borderWidth: 1,
label: {
show: true,
position: 'inside'
position: 'outer'
},
labelLine: {
show: true,
......@@ -3379,8 +3383,10 @@ define('echarts/echarts', [
position: 'inside'
},
nodeStyle: {
borderColor: '#5182ab',
borderWidth: 1
brushType: 'both',
color: '#f08c2e',
strokeColor: '#5182ab',
lineWidth: 1
},
linkStyle: {
color: '#5182ab',
......@@ -5908,6 +5914,7 @@ define('zrender/zrender', [
params.push({
seriesIndex: seriesIndex[i],
seriesName: seriesArray[i].name || '',
series: seriesArray[i],
dataIndex: dataIndex,
data: data,
name: categoryAxis.getNameByIndex(dataIndex),
......@@ -6009,6 +6016,7 @@ define('zrender/zrender', [
params.push({
seriesIndex: seriesIndex[i],
seriesName: seriesArray[i].name || '',
series: seriesArray[i],
dataIndex: dataIndex,
data: data,
name: data.name,
......@@ -6110,6 +6118,7 @@ define('zrender/zrender', [
this._tDom.innerHTML = formatter.call(this.myChart, {
seriesIndex: ecData.get(this._curTarget, 'seriesIndex'),
seriesName: serie.name || '',
series: serie,
dataIndex: dataIndex,
data: data,
name: name,
......@@ -6681,6 +6690,9 @@ define('zrender/zrender', [
Legend.prototype = {
type: ecConfig.COMPONENT_TYPE_LEGEND,
_buildShape: function () {
if (!this.legendOption.show) {
return;
}
this._itemGroupLocation = this._getItemGroupLocation();
this._buildBackground();
this._buildItem();
......@@ -14875,7 +14887,12 @@ define('zrender/zrender', [
return finalTextStyle.fontStyle + ' ' + finalTextStyle.fontWeight + ' ' + finalTextStyle.fontSize + 'px ' + finalTextStyle.fontFamily;
},
getItemStyleColor: function (itemColor, seriesIndex, dataIndex, data) {
return typeof itemColor === 'function' ? itemColor(seriesIndex, dataIndex, data) : itemColor;
return typeof itemColor === 'function' ? itemColor.call(this.myChart, {
seriesIndex: seriesIndex,
series: this.series[seriesIndex],
dataIndex: dataIndex,
data: data
}) : itemColor;
},
subPixelOptimize: function (position, lineWidth) {
if (lineWidth % 2 === 1) {
......@@ -20338,6 +20355,9 @@ define('zrender/zrender', [
},
_buildShape: function () {
this._interval = this._getInterval();
if (!this.option.show) {
return;
}
this.option.splitArea.show && this._buildSplitArea();
this.option.splitLine.show && this._buildSplitLine();
this.option.axisLine.show && this._buildAxisLine();
......@@ -20734,7 +20754,7 @@ define('zrender/zrender', [
_buildShape: function () {
this._hasData = false;
this._calculateValue();
if (!this._hasData) {
if (!this._hasData || !this.option.show) {
return;
}
this.option.splitArea.show && this._buildSplitArea();
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册