Skip to content

Commit

Permalink
2.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed Dec 11, 2014
1 parent 6f9fd7a commit 59758db
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 68 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "echarts",
"version": "2.1.9",
"version": "2.1.10",
"homepage": "http://echarts.baidu.com",
"repository": "git://github.com/ecomfe/echarts",
"authors": [
Expand Down
26 changes: 13 additions & 13 deletions build/dist/echarts-all.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions build/dist/echarts.js

Large diffs are not rendered by default.

30 changes: 17 additions & 13 deletions build/source/echarts-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ define('echarts/echarts', [
var _idBase = new Date() - 0;
var _instances = {};
var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
self.version = '2.1.9';
self.version = '2.1.10';
self.dependencies = { zrender: '2.0.6' };
self.init = function (dom, theme) {
var zrender = require('zrender');
Expand Down Expand Up @@ -1368,7 +1368,7 @@ define('echarts/echarts', [
showDelay: 20,
hideDelay: 100,
transitionDuration: 0.4,
enterable: true,
enterable: false,
backgroundColor: 'rgba(0,0,0,0.7)',
borderColor: '#333',
borderRadius: 4,
Expand Down Expand Up @@ -4066,6 +4066,7 @@ define('zrender/zrender', [
__hide: function () {
this._lastDataIndex = -1;
this._lastSeriesIndex = -1;
this._lastItemTriggerId = -1;
if (this._tDom) {
this._tDom.style.display = 'none';
}
Expand Down Expand Up @@ -4568,8 +4569,7 @@ define('zrender/zrender', [
position = this.query(data, 'tooltip.position') || position;
specialCssText += this._style(this.query(data, 'tooltip'));
} else {
this._lastDataIndex = NaN;
this._lastSeriesIndex = NaN;
this._lastItemTriggerId = NaN;
showContent = this.deepQuery([
data,
serie,
Expand All @@ -4586,9 +4586,8 @@ define('zrender/zrender', [
this.option
], 'tooltip.islandPosition');
}
if (this._lastDataIndex != dataIndex || this._lastSeriesIndex != seriesIndex) {
this._lastDataIndex = dataIndex;
this._lastSeriesIndex = seriesIndex;
if (this._lastItemTriggerId !== this._curTarget.id) {
this._lastItemTriggerId = this._curTarget.id;
if (typeof formatter === 'function') {
this._curTicket = (serie.name || '') + ':' + dataIndex;
this._tDom.innerHTML = formatter.call(this.myChart, {
Expand Down Expand Up @@ -4626,7 +4625,7 @@ define('zrender/zrender', [
} else if (serie.type === ecConfig.CHART_TYPE_EVENTRIVER) {
this._tDom.innerHTML = this._itemFormatter.eventRiver.call(this, serie, name, value, data);
} else {
this._tDom.innerHTML = '' + (serie.name != null ? this._encodeHTML(serie.name) + '<br/>' : '') + (name === '' ? '' : this._encodeHTML(name) + ' : ') + (value instanceof Array ? value : this.numAddCommas(value)) + (special == null ? '' : ' (' + special + ')');
this._tDom.innerHTML = '' + (serie.name != null ? this._encodeHTML(serie.name) + '<br/>' : '') + (name === '' ? '' : this._encodeHTML(name) + ' : ') + (value instanceof Array ? value : this.numAddCommas(value));
}
}
}
Expand Down Expand Up @@ -4798,7 +4797,7 @@ define('zrender/zrender', [
__onmousemove: function (param) {
clearTimeout(this._hidingTicket);
clearTimeout(this._showingTicket);
if (this._mousein && this.enterable) {
if (this._mousein && this._enterable) {
return;
}
var target = param.target;
Expand Down Expand Up @@ -5077,6 +5076,7 @@ define('zrender/zrender', [
this.shapeList.length = 2;
this._lastDataIndex = -1;
this._lastSeriesIndex = -1;
this._lastItemTriggerId = -1;
if (newOption) {
this.option = newOption;
this.option.tooltip = this.reformOption(this.option.tooltip);
Expand All @@ -5097,6 +5097,7 @@ define('zrender/zrender', [
this._defaultCssText = this._style(this.option.tooltip);
this._setSelectedMap();
this._axisLineWidth = this.option.tooltip.axisPointer.lineStyle.width;
this._enterable = this.option.tooltip.enterable;
}
if (this.showing) {
var self = this;
Expand Down Expand Up @@ -8968,7 +8969,10 @@ define('zrender/zrender', [
}
var doc = this.element_.ownerDocument;
this.textMeasureEl_.innerHTML = '';
this.textMeasureEl_.style.font = this.font;
try {
this.textMeasureEl_.style.font = this.font;
} catch (ex) {
}
this.textMeasureEl_.appendChild(doc.createTextNode(text));
return { width: this.textMeasureEl_.offsetWidth };
};
Expand Down Expand Up @@ -15202,15 +15206,15 @@ define('zrender/zrender', [
this.setTransform(ctx);
ctx.save();
ctx.beginPath();
this.buildLinePath(ctx, style);
this.buildLinePath(ctx, style, this.style.lineWidth || 1);
ctx.stroke();
ctx.restore();
this.brushSymbol(ctx, style, 0);
this.brushSymbol(ctx, style, 1);
this.drawText(ctx, style, this.style);
ctx.restore();
},
buildLinePath: function (ctx, style) {
buildLinePath: function (ctx, style, lineWidth) {
var pointList = style.pointList || this.getPointList(style);
style.pointList = pointList;
var len = Math.min(style.pointList.length, Math.round(style.pointListLength || style.pointList.length));
Expand All @@ -15221,7 +15225,7 @@ define('zrender/zrender', [
}
} else if (style.lineType == 'dashed' || style.lineType == 'dotted') {
if (style.smooth !== 'spline') {
var dashLength = (style.lineWidth || 1) * (style.lineType == 'dashed' ? 5 : 1);
var dashLength = lineWidth * (style.lineType == 'dashed' ? 5 : 1);
ctx.moveTo(pointList[0][0], pointList[0][1]);
for (var i = 1; i < len; i++) {
dashedLineTo(ctx, pointList[i - 1][0], pointList[i - 1][1], pointList[i][0], pointList[i][1], dashLength);
Expand Down
30 changes: 17 additions & 13 deletions build/source/echarts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ define('echarts/echarts', [
var _idBase = new Date() - 0;
var _instances = {};
var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
self.version = '2.1.9';
self.version = '2.1.10';
self.dependencies = { zrender: '2.0.6' };
self.init = function (dom, theme) {
var zrender = require('zrender');
Expand Down Expand Up @@ -2906,7 +2906,7 @@ define('echarts/echarts', [
showDelay: 20,
hideDelay: 100,
transitionDuration: 0.4,
enterable: true,
enterable: false,
backgroundColor: 'rgba(0,0,0,0.7)',
borderColor: '#333',
borderRadius: 4,
Expand Down Expand Up @@ -5604,6 +5604,7 @@ define('zrender/zrender', [
__hide: function () {
this._lastDataIndex = -1;
this._lastSeriesIndex = -1;
this._lastItemTriggerId = -1;
if (this._tDom) {
this._tDom.style.display = 'none';
}
Expand Down Expand Up @@ -6106,8 +6107,7 @@ define('zrender/zrender', [
position = this.query(data, 'tooltip.position') || position;
specialCssText += this._style(this.query(data, 'tooltip'));
} else {
this._lastDataIndex = NaN;
this._lastSeriesIndex = NaN;
this._lastItemTriggerId = NaN;
showContent = this.deepQuery([
data,
serie,
Expand All @@ -6124,9 +6124,8 @@ define('zrender/zrender', [
this.option
], 'tooltip.islandPosition');
}
if (this._lastDataIndex != dataIndex || this._lastSeriesIndex != seriesIndex) {
this._lastDataIndex = dataIndex;
this._lastSeriesIndex = seriesIndex;
if (this._lastItemTriggerId !== this._curTarget.id) {
this._lastItemTriggerId = this._curTarget.id;
if (typeof formatter === 'function') {
this._curTicket = (serie.name || '') + ':' + dataIndex;
this._tDom.innerHTML = formatter.call(this.myChart, {
Expand Down Expand Up @@ -6164,7 +6163,7 @@ define('zrender/zrender', [
} else if (serie.type === ecConfig.CHART_TYPE_EVENTRIVER) {
this._tDom.innerHTML = this._itemFormatter.eventRiver.call(this, serie, name, value, data);
} else {
this._tDom.innerHTML = '' + (serie.name != null ? this._encodeHTML(serie.name) + '<br/>' : '') + (name === '' ? '' : this._encodeHTML(name) + ' : ') + (value instanceof Array ? value : this.numAddCommas(value)) + (special == null ? '' : ' (' + special + ')');
this._tDom.innerHTML = '' + (serie.name != null ? this._encodeHTML(serie.name) + '<br/>' : '') + (name === '' ? '' : this._encodeHTML(name) + ' : ') + (value instanceof Array ? value : this.numAddCommas(value));
}
}
}
Expand Down Expand Up @@ -6336,7 +6335,7 @@ define('zrender/zrender', [
__onmousemove: function (param) {
clearTimeout(this._hidingTicket);
clearTimeout(this._showingTicket);
if (this._mousein && this.enterable) {
if (this._mousein && this._enterable) {
return;
}
var target = param.target;
Expand Down Expand Up @@ -6615,6 +6614,7 @@ define('zrender/zrender', [
this.shapeList.length = 2;
this._lastDataIndex = -1;
this._lastSeriesIndex = -1;
this._lastItemTriggerId = -1;
if (newOption) {
this.option = newOption;
this.option.tooltip = this.reformOption(this.option.tooltip);
Expand All @@ -6635,6 +6635,7 @@ define('zrender/zrender', [
this._defaultCssText = this._style(this.option.tooltip);
this._setSelectedMap();
this._axisLineWidth = this.option.tooltip.axisPointer.lineStyle.width;
this._enterable = this.option.tooltip.enterable;
}
if (this.showing) {
var self = this;
Expand Down Expand Up @@ -10506,7 +10507,10 @@ define('zrender/zrender', [
}
var doc = this.element_.ownerDocument;
this.textMeasureEl_.innerHTML = '';
this.textMeasureEl_.style.font = this.font;
try {
this.textMeasureEl_.style.font = this.font;
} catch (ex) {
}
this.textMeasureEl_.appendChild(doc.createTextNode(text));
return { width: this.textMeasureEl_.offsetWidth };
};
Expand Down Expand Up @@ -16740,15 +16744,15 @@ define('zrender/zrender', [
this.setTransform(ctx);
ctx.save();
ctx.beginPath();
this.buildLinePath(ctx, style);
this.buildLinePath(ctx, style, this.style.lineWidth || 1);
ctx.stroke();
ctx.restore();
this.brushSymbol(ctx, style, 0);
this.brushSymbol(ctx, style, 1);
this.drawText(ctx, style, this.style);
ctx.restore();
},
buildLinePath: function (ctx, style) {
buildLinePath: function (ctx, style, lineWidth) {
var pointList = style.pointList || this.getPointList(style);
style.pointList = pointList;
var len = Math.min(style.pointList.length, Math.round(style.pointListLength || style.pointList.length));
Expand All @@ -16759,7 +16763,7 @@ define('zrender/zrender', [
}
} else if (style.lineType == 'dashed' || style.lineType == 'dotted') {
if (style.smooth !== 'spline') {
var dashLength = (style.lineWidth || 1) * (style.lineType == 'dashed' ? 5 : 1);
var dashLength = lineWidth * (style.lineType == 'dashed' ? 5 : 1);
ctx.moveTo(pointList[0][0], pointList[0][1]);
for (var i = 1; i < len; i++) {
dashedLineTo(ctx, pointList[i - 1][0], pointList[i - 1][1], pointList[i][0], pointList[i][1], dashLength);
Expand Down
2 changes: 1 addition & 1 deletion doc/asset/js/echartsHome.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var version = '2.1.9';
var version = '2.1.10';
var sp = location.href.lastIndexOf('/');
var ep = location.href.lastIndexOf('.html');
var curPage = sp < ep ? location.href.slice(sp + 1, ep) : 'index';
Expand Down
3 changes: 2 additions & 1 deletion doc/example/eventRiver1.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
subtext: '纯属虚构'
},
tooltip : {
trigger: 'item'
trigger: 'item',
enterable: true
},
legend: {
data:['财经事件', '政治事件']
Expand Down
3 changes: 2 additions & 1 deletion doc/example/eventRiver2.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
subtext: '纯属虚构'
},
tooltip : {
trigger: 'item'
trigger: 'item',
enterable: true
},
legend: {
data: legendName
Expand Down
10 changes: 5 additions & 5 deletions doc/example/www/js/echarts.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions doc/example/www2/js/echarts-all.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "echarts",
"description": "Enterprise Charts,基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据可视化表。",
"version": "2.1.9",
"version": "2.1.10",
"maintainers": [
{ "name": "Kener", "email": "[email protected]" },
{ "name": "Pissang", "email": "[email protected]" },
Expand Down
2 changes: 1 addition & 1 deletion src/echarts.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define(function (require) {
var _instances = {}; // ECharts实例map索引
var DOM_ATTRIBUTE_KEY = '_echarts_instance_';

self.version = '2.1.9';
self.version = '2.1.10';
self.dependencies = {
zrender: '2.0.6'
};
Expand Down

0 comments on commit 59758db

Please sign in to comment.