Skip to content

Commit

Permalink
特效优化
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed Jun 10, 2014
1 parent 46b9ce2 commit 6fedd9c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
38 changes: 28 additions & 10 deletions doc/example/map11.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
min : 0,
max : 100,
calculable : true,
color: ['red','orange','yellow','lightgreen'],
color: ['#ff3333', 'orange', 'yellow','lime','aqua'],
textStyle:{
color:'#fff'
}
Expand Down Expand Up @@ -429,12 +429,18 @@
smooth:true,
effect : {
show: true,
size: 3,
shadowColor: 'yellow'
scaleSize: 1,
period: 30,
color: '#fff',
shadowBlur: 10
},
itemStyle : {
normal: {
borderWidth:1
borderWidth:1,
lineStyle: {
type: 'solid',
shadowBlur: 10
}
}
},
data : [
Expand Down Expand Up @@ -487,12 +493,18 @@
smooth:true,
effect : {
show: true,
size: 3,
shadowColor: 'aqua'
scaleSize: 1,
period: 30,
color: '#fff',
shadowBlur: 10
},
itemStyle : {
normal: {
borderWidth:1
borderWidth:1,
lineStyle: {
type: 'solid',
shadowBlur: 10
}
}
},
data : [
Expand Down Expand Up @@ -545,12 +557,18 @@
smooth:true,
effect : {
show: true,
size: 3,
shadowColor: 'lime'
scaleSize: 1,
period: 30,
color: '#fff',
shadowBlur: 10
},
itemStyle : {
normal: {
borderWidth:1
borderWidth:1,
lineStyle: {
type: 'solid',
shadowBlur: 10
}
}
},
data : [
Expand Down
6 changes: 5 additions & 1 deletion src/chart/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,11 @@ define(function (require) {
yEnd : yEnd, // 坐标
brushType : 'both',
lineType : nlineStyle.type,
shadowColor : nlineStyle.shadowColor,
shadowColor : nlineStyle.shadowColor
|| nlineStyle.color
|| normal.borderColor
|| normal.color
|| color,
shadowBlur: nlineStyle.shadowBlur,
shadowOffsetX: nlineStyle.shadowOffsetX,
shadowOffsetY: nlineStyle.shadowOffsetY,
Expand Down
2 changes: 1 addition & 1 deletion src/util/ecEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ define(function (require) {
function line(zr, effectList, shape, zlevel) {
var effect = shape.effect;
var color = effect.color || shape.style.strokeColor || shape.style.color;
var shadowColor = effect.shadowColor || color;
var shadowColor = effect.shadowColor || shape.style.strokeColor || color;
var size = shape.style.lineWidth * effect.scaleSize;
var shadowBlur = typeof effect.shadowBlur != 'undefined'
? effect.shadowBlur : size;
Expand Down

0 comments on commit 6fedd9c

Please sign in to comment.