Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
半栈学徒
incubator-echarts
提交
feafbb9e
I
incubator-echarts
项目概览
半栈学徒
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
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,发现更多精彩内容 >>
提交
feafbb9e
编写于
6月 18, 2013
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jshint~
上级
17c739b7
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
100 addition
and
118 deletion
+100
-118
src/chart/k.js
src/chart/k.js
+1
-6
src/chart/map.js
src/chart/map.js
+3
-6
src/chart/scatter.js
src/chart/scatter.js
+3
-5
src/component/dataRange.js
src/component/dataRange.js
+14
-19
src/component/legend.js
src/component/legend.js
+1
-1
src/component/tooltip.js
src/component/tooltip.js
+1
-1
src/component/valueAxis.js
src/component/valueAxis.js
+1
-1
src/config.js
src/config.js
+2
-2
src/util/mapData/china.js
src/util/mapData/china.js
+70
-70
src/util/shape/symbol.js
src/util/shape/symbol.js
+4
-7
未找到文件。
src/chart/k.js
浏览文件 @
feafbb9e
...
...
@@ -25,8 +25,6 @@ define(function(require) {
var
ecConfig
=
require
(
'
../config
'
);
var
ecData
=
require
(
'
../util/ecData
'
);
var
zrColor
=
require
(
'
zrender/tool/color
'
);
var
self
=
this
;
self
.
type
=
ecConfig
.
CHART_TYPE_K
;
...
...
@@ -42,14 +40,11 @@ define(function(require) {
top
:
[],
bottom
:
[]
};
var
xAxisIndex
;
var
yAxisIndex
;
var
xAxis
;
for
(
var
i
=
0
,
l
=
series
.
length
;
i
<
l
;
i
++
)
{
if
(
series
[
i
].
type
==
ecConfig
.
CHART_TYPE_K
)
{
series
[
i
]
=
self
.
reformOption
(
series
[
i
]);
xAxisIndex
=
series
[
i
].
xAxisIndex
;
xAxis
=
component
.
xAxis
.
getAxis
(
xAxisIndex
);
xAxis
=
component
.
xAxis
.
getAxis
(
series
[
i
].
xAxisIndex
);
if
(
xAxis
.
type
==
ecConfig
.
COMPONENT_TYPE_AXIS_CATEGORY
)
{
_position2sIndexMap
[
xAxis
.
getPosition
()].
push
(
i
);
...
...
src/chart/map.js
浏览文件 @
feafbb9e
...
...
@@ -25,7 +25,6 @@ define(function(require) {
var
ecConfig
=
require
(
'
../config
'
);
var
ecData
=
require
(
'
../util/ecData
'
);
var
zrMath
=
require
(
'
zrender/tool/math
'
);
var
zrUtil
=
require
(
'
zrender/tool/util
'
);
var
self
=
this
;
...
...
@@ -75,10 +74,8 @@ define(function(require) {
if
(
key
!=
'
value
'
)
{
valueData
[
name
][
key
]
=
data
[
j
][
key
];
}
else
{
if
(
!
isNaN
(
data
[
j
].
value
))
{
valueData
[
name
].
value
+=
data
[
j
].
value
;
}
else
if
(
!
isNaN
(
data
[
j
].
value
))
{
valueData
[
name
].
value
+=
data
[
j
].
value
;
}
}
//索引有该区域的系列样式
...
...
@@ -135,7 +132,7 @@ define(function(require) {
];
}
}
return
scale
return
scale
;
}
function
_buildMap
(
mapData
,
valueData
)
{
...
...
src/chart/scatter.js
浏览文件 @
feafbb9e
...
...
@@ -90,7 +90,7 @@ define(function(require) {
var
data
;
var
value
;
var
xAxis
;
var
yAxis
var
yAxis
;
var
pointList
=
{};
var
x
;
...
...
@@ -99,7 +99,7 @@ define(function(require) {
for
(
var
j
=
0
,
k
=
seriesArray
.
length
;
j
<
k
;
j
++
)
{
seriesIndex
=
seriesArray
[
j
];
serie
=
series
[
seriesIndex
];
if
(
serie
.
data
.
length
==
0
)
{
if
(
serie
.
data
.
length
==
=
0
)
{
continue
;
}
...
...
@@ -142,7 +142,6 @@ define(function(require) {
* 生成折线和折线上的拐点
*/
function
_buildPointList
(
pointList
)
{
var
zrColor
=
require
(
'
zrender/tool/color
'
);
var
nColor
;
// normal
var
eColor
;
// emphasis
...
...
@@ -297,7 +296,7 @@ define(function(require) {
};
break
;
}
itemShape
.
_serieIndex
=
seriesIndex
itemShape
.
_serieIndex
=
seriesIndex
;
itemShape
.
zlevel
=
_zlevelBase
;
itemShape
.
style
.
color
=
nColor
;
itemShape
.
style
.
strokeColor
=
nColor
;
...
...
@@ -370,7 +369,6 @@ define(function(require) {
* 动画设定
*/
function
animation
()
{
return
;
var
duration
=
self
.
deepQuery
([
option
],
'
animationDuration
'
);
var
easing
=
self
.
deepQuery
([
option
],
'
animationEasing
'
);
var
x
;
...
...
src/component/dataRange.js
浏览文件 @
feafbb9e
...
...
@@ -14,7 +14,7 @@ define(function (require) {
* @param {Object} option 图表参数
* @param {Object=} selected 用于状态保持
*/
function
DataRange
(
messageCenter
,
zr
,
option
,
selected
)
{
function
DataRange
(
messageCenter
,
zr
,
option
)
{
var
Base
=
require
(
'
./base
'
);
Base
.
call
(
this
,
zr
);
...
...
@@ -75,7 +75,6 @@ define(function (require) {
var
textShape
;
var
font
=
self
.
getFont
(
dataRangeOption
.
textStyle
);
var
zrWidth
=
zr
.
getWidth
();
var
lastX
=
_itemGroupLocation
.
x
;
var
lastY
=
_itemGroupLocation
.
y
;
var
itemWidth
=
dataRangeOption
.
itemWidth
;
...
...
@@ -187,19 +186,15 @@ define(function (require) {
* 构建渐变型的值域元素
*/
function
_buildGradient
()
{
var
itemName
;
var
itemShape
;
var
textShape
;
var
font
=
self
.
getFont
(
dataRangeOption
.
textStyle
);
var
zrWidth
=
zr
.
getWidth
();
var
lastX
=
_itemGroupLocation
.
x
;
var
lastY
=
_itemGroupLocation
.
y
;
var
itemWidth
=
dataRangeOption
.
itemWidth
;
var
itemHeight
=
dataRangeOption
.
itemHeight
;
var
itemGap
=
dataRangeOption
.
itemGap
;
var
textHeight
=
zrArea
.
getTextWidth
(
'
国
'
,
font
);
var
color
;
var
needValueText
=
true
;
...
...
@@ -270,7 +265,7 @@ define(function (require) {
if
(
dataRangeOption
.
calculable
)
{
_calculableLocation
=
itemShape
.
style
;
_buildFiller
();
_bulidMask
()
_bulidMask
()
;
_bulidHandle
();
}
...
...
@@ -335,8 +330,8 @@ define(function (require) {
// 手柄统统在下方
pointListStart
=
[
[
x
,
y
],
[
x
,
y
+
height
+
textHieght
+
textHieght
/
2
],
[
x
-
textWidth
,
y
+
height
+
textHieght
+
textHieght
/
2
],
[
x
,
y
+
height
+
textHieght
/
2
*
3
],
[
x
-
textWidth
,
y
+
height
+
textHieght
/
2
*
3
],
[
x
-
textWidth
,
y
+
height
+
textHieght
/
2
],
[
x
-
textHieght
/
2
,
y
+
height
+
textHieght
/
2
],
[
x
-
1
,
y
+
height
],
...
...
@@ -348,10 +343,10 @@ define(function (require) {
pointListEnd
=
[
[
x
+
width
,
y
],
[
x
+
width
,
y
+
height
+
textHieght
+
textHieght
/
2
],
[
x
+
width
+
textWidth
,
y
+
height
+
textHieght
+
textHieght
/
2
],
[
x
+
width
,
y
+
height
+
textHieght
/
2
*
3
],
[
x
+
width
+
textWidth
,
y
+
height
+
textHieght
/
2
*
3
],
[
x
+
width
+
textWidth
,
y
+
height
+
textHieght
/
2
],
[
x
+
width
+
textHieght
/
2
,
y
+
height
+
textHieght
/
2
],
[
x
+
width
+
textHieght
/
2
,
y
+
height
+
textHieght
/
2
],
[
x
+
width
+
1
,
y
+
height
],
[
x
+
width
+
1
,
y
]
];
...
...
@@ -362,8 +357,8 @@ define(function (require) {
// 手柄在上方
pointListStart
=
[
[
x
,
y
+
height
],
[
x
,
y
-
textHieght
-
textHieght
/
2
],
[
x
-
textWidth
,
y
-
textHieght
-
textHieght
/
2
],
[
x
,
y
-
textHieght
/
2
*
3
],
[
x
-
textWidth
,
y
-
textHieght
/
2
*
3
],
[
x
-
textWidth
,
y
-
textHieght
/
2
],
[
x
-
textHieght
/
2
,
y
-
textHieght
/
2
],
[
x
-
1
,
y
],
...
...
@@ -375,8 +370,8 @@ define(function (require) {
pointListEnd
=
[
[
x
+
width
,
y
+
height
],
[
x
+
width
,
y
-
textHieght
-
textHieght
/
2
],
[
x
+
width
+
textWidth
,
y
-
textHieght
-
textHieght
/
2
],
[
x
+
width
,
y
-
textHieght
/
2
*
3
],
[
x
+
width
+
textWidth
,
y
-
textHieght
/
2
*
3
],
[
x
+
width
+
textWidth
,
y
-
textHieght
/
2
],
[
x
+
width
+
textHieght
/
2
,
y
-
textHieght
/
2
],
[
x
+
width
+
1
,
y
],
...
...
@@ -767,7 +762,7 @@ define(function (require) {
textAlign
:
(
dataRangeOption
.
orient
==
'
horizontal
'
?
'
left
'
:
'
center
'
)
}
}
}
;
}
// 色尺legend item shape
...
...
@@ -928,7 +923,7 @@ define(function (require) {
}
else
if
(
e
.
id
==
_endShape
.
id
&&
a
>=
b
)
{
// _endShape触发
a
=
b
;
;
a
=
b
;
_startShape
.
style
.
x
=
a
;
}
_fillerShae
.
style
.
x
=
a
;
...
...
@@ -950,7 +945,7 @@ define(function (require) {
}
else
if
(
e
.
id
==
_endShape
.
id
&&
a
>=
b
)
{
// _endShape触发
a
=
b
;
;
a
=
b
;
_startShape
.
style
.
y
=
a
;
}
_fillerShae
.
style
.
y
=
a
;
...
...
src/component/legend.js
浏览文件 @
feafbb9e
...
...
@@ -353,7 +353,7 @@ define(function (require) {
brushType
:
'
both
'
},
clickable
:
true
}
}
;
default
:
return
{
shape
:
'
rectangle
'
,
...
...
src/component/tooltip.js
浏览文件 @
feafbb9e
...
...
@@ -601,7 +601,7 @@ define(function (require) {
}
else
{
_tDom
.
innerHTML
=
serie
.
name
+
'
<br/>
'
+
(
name
==
''
?
''
:
(
name
+
'
:
'
))
(
name
==
=
''
?
''
:
(
name
+
'
:
'
))
+
value
+
(
typeof
speical
==
'
undefined
'
?
''
...
...
src/component/valueAxis.js
浏览文件 @
feafbb9e
...
...
@@ -647,7 +647,7 @@ define(function (require) {
}
}
_min
=
-
splitGap
*
splitNumber
+
_max
;
;
_min
=
-
splitGap
*
splitNumber
+
_max
;
}
else
{
// 一正一负,确保0被选中
...
...
src/config.js
浏览文件 @
feafbb9e
...
...
@@ -327,8 +327,8 @@ define(function() {
scatter
:
{
xAxisIndex
:
0
,
yAxisIndex
:
0
,
//symbol: null,
// 图形类型,非标准参数
symbolSize
:
4
// 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
//symbol: null, // 图形类型,非标准参数
symbolSize
:
4
// 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
},
// 饼图默认参数
...
...
src/util/mapData/china.js
浏览文件 @
feafbb9e
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
src/util/shape/symbol.js
浏览文件 @
feafbb9e
...
...
@@ -74,8 +74,6 @@
*/
define
(
function
(
require
)
{
var
matrix
=
require
(
'
zrender/tool/matrix
'
);
function
Symbol
()
{
this
.
type
=
'
symbol
'
;
}
...
...
@@ -166,8 +164,8 @@ define(
buildPath
:
function
(
ctx
,
style
)
{
var
pointList
=
style
.
pointList
;
var
rect
=
this
.
getRect
(
style
);
console
.
log
(
rect
)
var
ti
=
new
Date
();
//
console.log(rect)
//
var ti = new Date();
var
pixels
=
ctx
.
getImageData
(
rect
.
x
,
rect
.
y
,
rect
.
width
,
rect
.
height
);
...
...
@@ -190,7 +188,7 @@ define(
data
[
idx
+
3
]
=
255
;
}
ctx
.
putImageData
(
pixels
,
rect
.
x
,
rect
.
y
);
console
.
log
(
new
Date
()
-
ti
);
//
console.log(new Date() - ti);
return
;
},
...
...
@@ -203,8 +201,7 @@ define(
return
shape
.
get
(
'
polygon
'
).
getRect
(
style
);
},
isCover
:
function
(
e
,
x
,
y
)
{
isCover
:
function
()
{
return
false
;
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录