Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
c6ea88a4
I
incubator-echarts
项目概览
x649585723
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c6ea88a4
编写于
11月 04, 2017
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix build
上级
27d4e573
变更
3
展开全部
显示空白变更内容
内联
并排
Showing
3 changed file
with
137 addition
and
71 deletion
+137
-71
build/build.js
build/build.js
+2
-2
dist/echarts.js
dist/echarts.js
+134
-68
dist/echarts.js.map
dist/echarts.js.map
+1
-1
未找到文件。
build/build.js
浏览文件 @
c6ea88a4
...
...
@@ -90,11 +90,11 @@ function run() {
let
opt
=
{
lang
:
commander
.
lang
||
null
,
min
:
!!
commander
.
min
,
min
:
commander
.
min
,
type
:
commander
.
type
||
''
,
input
:
commander
.
input
,
output
:
commander
.
output
,
sourcemap
:
!!
commander
.
sourcemap
,
sourcemap
:
commander
.
sourcemap
,
format
:
commander
.
format
||
'
umd
'
};
...
...
dist/echarts.js
浏览文件 @
c6ea88a4
...
...
@@ -4,16 +4,11 @@
(factory((global.echarts = {})));
}(this, (function (exports) { 'use strict';
// Enable DEV mode when using source code without build. which has no __DEV__ variable
// In build process 'typeof __DEV__' will be replace with 'boolean'
// So this code will be removed or disabled anyway after built.
if (typeof __DEV__ === 'undefined') {
// In browser
if (typeof window !== 'undefined') {
if (typeof __DEV__ === "undefined") {
if (typeof window !== "undefined") {
window.__DEV__ = true;
}
// In node
else if (typeof global !== 'undefined') {
else if (typeof global !== "undefined") {
global.__DEV__ = true;
}
}
...
...
@@ -28792,7 +28787,10 @@ var defaultOption = {
color: '#333',
width: 1,
type: 'solid'
}
},
// 坐标轴两端的箭头
symbol: ['none', 'none'],
symbolSize: [10, 15]
},
// 坐标轴小标记
axisTick: {
...
...
@@ -29064,6 +29062,18 @@ function isAxisUsedInTheGrid(axisModel, gridModel, ecModel) {
return axisModel.getCoordSysModel() === gridModel;
}
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);
var afterHeight = beforeWidth * Math.sin(rotateRadians) + beforeHeight * Math.cos(rotateRadians);
var rotatedRect = new BoundingRect(boundingBox.x, boundingBox.y, afterWidth, afterHeight);
return rotatedRect;
}
function getLabelUnionRect(axis) {
var axisModel = axis.model;
var labels = axisModel.getFormattedLabels();
...
...
@@ -29077,8 +29087,9 @@ function getLabelUnionRect(axis) {
}
for (var i = 0; i < labelCount; i += step) {
if (!axis.isLabelIgnored(i)) {
var singleRect = axisLabelModel.getTextRect(labels[i]);
// FIXME consider label rotate
var unrotatedSingleRect = axisLabelModel.getTextRect(labels[i]);
var singleRect = rotateTextRect(unrotatedSingleRect, axisLabelModel.get('rotate') || 0);
rect ? rect.union(singleRect) : (rect = singleRect);
}
}
...
...
@@ -29663,9 +29674,6 @@ Grid.dimensions = Grid.prototype.dimensions = Cartesian2D.prototype.dimensions;
CoordinateSystemManager.register('cartesian2d', Grid);
var v2ApplyTransform$1 = applyTransform;
var retrieve$1 = retrieve;
var PI$2 = Math.PI;
function makeAxisEventDataBase(axisModel) {
...
...
@@ -29797,12 +29805,18 @@ var builders = {
var pt1 = [extent[0], 0];
var pt2 = [extent[1], 0];
if (matrix) {
v2ApplyTransform$1
(pt1, pt1, matrix);
v2ApplyTransform$1
(pt2, pt2, matrix);
applyTransform
(pt1, pt1, matrix);
applyTransform
(pt2, pt2, matrix);
}
this.group.add(new Line(subPixelOptimizeLine({
var lineStyle = extend(
{
lineCap: 'round'
},
axisModel.getModel('axisLine.lineStyle').getLineStyle()
);
this.group.add(new Line(subPixelOptimizeLine({
// Id for animation
anid: 'line',
...
...
@@ -29812,14 +29826,53 @@ var builders = {
x2: pt2[0],
y2: pt2[1]
},
style: extend(
{lineCap: 'round'},
axisModel.getModel('axisLine.lineStyle').getLineStyle()
),
style: lineStyle,
strokeContainThreshold: opt.strokeContainThreshold || 5,
silent: true,
z2: 1
})));
var arrows = axisModel.get('axisLine.symbol');
var arrowSize = axisModel.get('axisLine.symbolSize');
if (arrows != null) {
if (typeof arrows === 'string') {
// Use the same arrow for start and end point
arrows = [arrows, arrows];
}
if (typeof arrowSize === 'string'
|| typeof arrowSize === 'number'
) {
// Use the same size for width and height
arrowSize = [arrowSize, arrowSize];
}
var symbolWidth = arrowSize[0];
var symbolHeight = arrowSize[1];
each$1([
[opt.rotation + Math.PI / 2, pt1],
[opt.rotation - Math.PI / 2, pt2]
], function (item, index) {
if (arrows[index] !== 'none' && arrows[index] != null) {
var symbol = createSymbol(
arrows[index],
-symbolWidth / 2,
-symbolHeight / 2,
symbolWidth,
symbolHeight,
lineStyle.stroke,
true
);
symbol.attr({
rotation: item[0],
position: item[1],
silent: true
});
this.group.add(symbol);
}
}, this);
}
},
/**
...
...
@@ -29841,7 +29894,7 @@ var builders = {
axisName: function () {
var opt = this.opt;
var axisModel = this.axisModel;
var name = retrieve
$1
(opt.axisName, axisModel.get('name'));
var name = retrieve(opt.axisName, axisModel.get('name'));
if (!name) {
return;
...
...
@@ -29898,7 +29951,7 @@ var builders = {
var truncateOpt = axisModel.get('nameTruncate', true) || {};
var ellipsis = truncateOpt.ellipsis;
var maxWidth = retrieve
$1
(
var maxWidth = retrieve(
opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth
);
// FIXME
...
...
@@ -30223,8 +30276,8 @@ function buildAxisTick(axisBuilder, axisModel, opt) {
pt2[1] = opt.tickDirection * tickLen;
if (matrix) {
v2ApplyTransform$1
(pt1, pt1, matrix);
v2ApplyTransform$1
(pt2, pt2, matrix);
applyTransform
(pt1, pt1, matrix);
applyTransform
(pt2, pt2, matrix);
}
// Tick line, Not use group transform to have better line draw
var tickEl = new Line(subPixelOptimizeLine({
...
...
@@ -30255,7 +30308,7 @@ function buildAxisTick(axisBuilder, axisModel, opt) {
function buildAxisLabel(axisBuilder, axisModel, opt) {
var axis = axisModel.axis;
var show = retrieve
$1
(opt.axisLabelShow, axisModel.get('axisLabel.show'));
var show = retrieve(opt.axisLabelShow, axisModel.get('axisLabel.show'));
if (!show || axis.scale.isBlank()) {
return;
...
...
@@ -30268,7 +30321,7 @@ function buildAxisLabel(axisBuilder, axisModel, opt) {
// Special label rotate.
var labelRotation = (
retrieve
$1
(opt.labelRotate, labelModel.get('rotate')) || 0
retrieve(opt.labelRotate, labelModel.get('rotate')) || 0
) * PI$2 / 180;
var labelLayout = innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);
...
...
@@ -34059,7 +34112,7 @@ var backwardCompat$1 = function (option) {
option.polar = polarNotRadar;
}
each$1(option.series, function (seriesOpt) {
if (seriesOpt.type === 'radar' && seriesOpt.polarIndex) {
if (seriesOpt
&& seriesOpt
.type === 'radar' && seriesOpt.polarIndex) {
seriesOpt.radarIndex = seriesOpt.polarIndex;
}
});
...
...
@@ -34374,7 +34427,7 @@ var parseGeoJson = function (geoJson) {
* Mapping given x, y to transformd view x, y
*/
var v2ApplyTransform$
2
= applyTransform;
var v2ApplyTransform$
1
= applyTransform;
// Dummy transform node
function TransformDummy() {
...
...
@@ -34599,7 +34652,7 @@ View.prototype = {
dataToPoint: function (data) {
var transform = this.transform;
return transform
? v2ApplyTransform$
2
([], data, transform)
? v2ApplyTransform$
1
([], data, transform)
: [data[0], data[1]];
},
...
...
@@ -34611,7 +34664,7 @@ View.prototype = {
pointToData: function (point) {
var invTransform = this.invTransform;
return invTransform
? v2ApplyTransform$
2
([], point, invTransform)
? v2ApplyTransform$
1
([], point, invTransform)
: [point[0], point[1]];
},
...
...
@@ -36547,15 +36600,12 @@ var backwardCompat$2 = function (option) {
// Save geoCoord
var mapSeries = [];
each$1(option.series, function (seriesOpt) {
if (seriesOpt.type === 'map') {
if (seriesOpt
&& seriesOpt
.type === 'map') {
mapSeries.push(seriesOpt);
}
});
each$1(mapSeries, function (seriesOpt) {
seriesOpt.map = seriesOpt.map || seriesOpt.mapType;
// Put x, y, width, height, x2, y2 in the top level
defaults(seriesOpt, seriesOpt.mapLocation);
}
});
};
...
...
@@ -53200,10 +53250,6 @@ extendChartView({
render: function (seriesModel, ecModel, api) {
var data = seriesModel.getData();
if (!data.count()) {
return;
}
var group = this.group;
var layerSeries = seriesModel.getLayerSeries();
...
...
@@ -53224,9 +53270,10 @@ extendChartView({
var newLayersGroups = {};
dataDiffer.add(bind(curry(process, 'add'), this))
.update(bind(curry(process, 'update'), this))
.remove(bind(curry(process, 'remove'), this))
dataDiffer
.add(bind(process, this, 'add'))
.update(bind(process, this, 'update'))
.remove(bind(process, this, 'remove'))
.execute();
function process(status, idx, oldIdx) {
...
...
@@ -58772,21 +58819,22 @@ var selector = {
lineY: getLineSelectors(1),
rect: {
point: function (itemLayout, selectors, area) {
return area.boundingRect.contain(itemLayout[0], itemLayout[1]);
return
itemLayout &&
area.boundingRect.contain(itemLayout[0], itemLayout[1]);
},
rect: function (itemLayout, selectors, area) {
return area.boundingRect.intersect(itemLayout);
return
itemLayout &&
area.boundingRect.intersect(itemLayout);
}
},
polygon: {
point: function (itemLayout, selectors, area) {
return area.boundingRect.contain(itemLayout[0], itemLayout[1])
return itemLayout
&& area.boundingRect.contain(itemLayout[0], itemLayout[1])
&& contain$1(area.range, itemLayout[0], itemLayout[1]);
},
rect: function (itemLayout, selectors, area) {
var points = area.range;
if (points.length <= 1) {
if (
!itemLayout ||
points.length <= 1) {
return false;
}
...
...
@@ -58818,11 +58866,14 @@ function getLineSelectors(xyIndex) {
return {
point: function (itemLayout, selectors, area) {
if (itemLayout) {
var range = area.range;
var p = itemLayout[xyIndex];
return inLineRange(p, range);
}
},
rect: function (itemLayout, selectors, area) {
if (itemLayout) {
var range = area.range;
var layoutRange = [
itemLayout[xy[xyIndex]],
...
...
@@ -58834,6 +58885,7 @@ function getLineSelectors(xyIndex) {
|| inLineRange(range[0], layoutRange)
|| inLineRange(range[1], layoutRange);
}
}
};
}
...
...
@@ -62334,12 +62386,8 @@ var DataZoomModel = extendComponentModel({
* @param {boolean} [ignoreUpdateRangeUsg=false]
*/
setRawRange: function (opt, ignoreUpdateRangeUsg) {
each$25(['start', 'end', 'startValue', 'endValue'], function (name) {
// If any of those prop is null/undefined, we should alos set
// them, because only one pair between start/end and
// startValue/endValue can work.
this.option[name] = opt[name];
}, this);
setOneSide(opt, this.option, 'start');
setOneSide(opt, this.option, 'end');
!ignoreUpdateRangeUsg && updateRangeUse(this, opt);
},
...
...
@@ -62415,6 +62463,24 @@ var DataZoomModel = extendComponentModel({
});
// percentName: 'start' or 'end', valueName: 'startValue' or 'endValue'
function setOneSide(inputParams, option, percentName) {
var names = [percentName, percentName + 'Value'];
var hasValueIdx;
each$25(names, function (name, index) {
if (inputParams[name] != null) {
option[name] = inputParams[name];
hasValueIdx = index;
}
});
// If only 'start' or 'startValue' is set in inputParams and then assigned
// to option, the other one should be cleared in option. because only one
// pair between start/end and startValue/endValue can work.
if (hasValueIdx != null) {
option[names[1 - hasValueIdx]] = null;
}
}
function retrieveRaw(option) {
var ret = {};
each$25(
dist/echarts.js.map
浏览文件 @
c6ea88a4
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录