Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
4f92e64e
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,发现更多精彩内容 >>
提交
4f92e64e
编写于
12月 01, 2015
作者:
L
lang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev-3.0.0' of
https://github.com/ecomfe/echarts
into dev-3.0.0
上级
4b2cbb82
358bda1c
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
167 addition
and
103 deletion
+167
-103
src/chart/treemap/TreemapSeries.js
src/chart/treemap/TreemapSeries.js
+5
-5
src/chart/treemap/treemapVisual.js
src/chart/treemap/treemapVisual.js
+14
-14
src/component/dataRange/DataRangeModel.js
src/component/dataRange/DataRangeModel.js
+3
-3
src/component/dataRange/PiecewiseModel.js
src/component/dataRange/PiecewiseModel.js
+1
-1
src/component/tooltip.js
src/component/tooltip.js
+25
-25
src/coord/polar/AxisModel.js
src/coord/polar/AxisModel.js
+2
-1
src/echarts.js
src/echarts.js
+4
-2
src/model/Global.js
src/model/Global.js
+81
-20
src/visual/VisualMapping.js
src/visual/VisualMapping.js
+8
-8
src/visual/visualDefault.js
src/visual/visualDefault.js
+3
-3
test/color-mix-aqi.html
test/color-mix-aqi.html
+1
-1
test/connect2.html
test/connect2.html
+1
-1
test/dataRange-scatter-alpha.html
test/dataRange-scatter-alpha.html
+1
-1
test/dataRange-scatter-layout1-text.html
test/dataRange-scatter-layout1-text.html
+3
-3
test/dataRange-scatter-layout1.html
test/dataRange-scatter-layout1.html
+3
-3
test/dataRange-scatter-layout2-text.html
test/dataRange-scatter-layout2-text.html
+4
-4
test/dataRange-scatter-layout2.html
test/dataRange-scatter-layout2.html
+4
-4
test/graph.html
test/graph.html
+1
-1
test/treemap-disk.html
test/treemap-disk.html
+2
-2
test/treemap-obama.html
test/treemap-obama.html
+1
-1
未找到文件。
src/chart/treemap/TreemapSeries.js
浏览文件 @
4f92e64e
...
...
@@ -83,18 +83,18 @@ define(function(require) {
itemStyle
:
{
normal
:
{
color
:
null
,
// 各异 如不需,可设为'none'
colorA
:
null
,
// 默认不设置 如不需,可设为'none'
colorS
:
null
,
// 默认不设置 如不需,可设为'none'
colorA
lpha
:
null
,
// 默认不设置 如不需,可设为'none'
colorS
aturation
:
null
,
// 默认不设置 如不需,可设为'none'
borderWidth
:
0
,
gapWidth
:
0
,
borderColor
:
'
#fff
'
,
borderColorS
:
null
// 如果设置,则borderColor的设置无效,而是取当前节点计算出的颜色,再经由borderColorS
处理。
borderColorS
aturation
:
null
// 如果设置,则borderColor的设置无效,而是取当前节点计算出的颜色,再经由borderColorSaturation
处理。
},
emphasis
:
{}
},
color
:
'
none
'
,
// 为数组,表示同一level的color 选取列表。默认空,在level[0].color中取系统color列表。
colorA
:
null
,
// 为数组,表示同一level的color alpha 选取范围。
colorS
:
null
,
// 为数组,表示同一level的color alpha 选取范围。
colorA
lpha
:
null
,
// 为数组,表示同一level的color alpha 选取范围。
colorS
aturation
:
null
,
// 为数组,表示同一level的color alpha 选取范围。
colorMappingBy
:
'
index
'
,
// 'value' or 'index' or 'id'.
visibleMin
:
10
,
// If area less than this threshold (unit: pixel^2), node will not be rendered.
// Only works when sort is 'asc' or 'desc'.
...
...
src/chart/treemap/treemapVisual.js
浏览文件 @
4f92e64e
...
...
@@ -55,12 +55,12 @@ define(function (require) {
// calculate border color
var
borderColor
=
nodeItemStyleModel
.
get
(
'
borderColor
'
);
var
borderColorS
=
nodeItemStyleModel
.
get
(
'
borderColorS
'
);
var
borderColorS
aturation
=
nodeItemStyleModel
.
get
(
'
borderColorSaturation
'
);
var
thisNodeColor
;
if
(
borderColorS
!=
null
)
{
if
(
borderColorS
aturation
!=
null
)
{
// For performance, do not always execute 'calculateColor'.
thisNodeColor
=
calculateColor
(
visuals
,
node
);
borderColor
=
calculateBorderColor
(
borderColorS
,
thisNodeColor
);
borderColor
=
calculateBorderColor
(
borderColorS
aturation
,
thisNodeColor
);
}
node
.
setVisual
(
'
borderColor
'
,
borderColor
);
...
...
@@ -97,7 +97,7 @@ define(function (require) {
)
{
var
visuals
=
zrUtil
.
extend
({},
designatedVisual
);
zrUtil
.
each
([
'
color
'
,
'
colorA
'
,
'
colorS
'
],
function
(
visualName
)
{
zrUtil
.
each
([
'
color
'
,
'
colorA
lpha
'
,
'
colorSaturation
'
],
function
(
visualName
)
{
// Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel
var
val
=
nodeItemStyleModel
.
get
(
visualName
,
true
);
// Ignore parent
val
==
null
&&
levelItemStyle
&&
(
val
=
levelItemStyle
[
visualName
]);
...
...
@@ -114,22 +114,22 @@ define(function (require) {
var
color
=
getValueVisualDefine
(
visuals
,
'
color
'
);
if
(
color
)
{
var
colorA
=
getValueVisualDefine
(
visuals
,
'
colorA
'
);
var
colorS
=
getValueVisualDefine
(
visuals
,
'
colorS
'
);
if
(
colorS
)
{
color
=
zrColor
.
modifyHSL
(
color
,
null
,
null
,
colorS
);
var
colorA
lpha
=
getValueVisualDefine
(
visuals
,
'
colorAlpha
'
);
var
colorS
aturation
=
getValueVisualDefine
(
visuals
,
'
colorSaturation
'
);
if
(
colorS
aturation
)
{
color
=
zrColor
.
modifyHSL
(
color
,
null
,
null
,
colorS
aturation
);
}
if
(
colorA
)
{
color
=
zrColor
.
modifyAlpha
(
color
,
colorA
);
if
(
colorA
lpha
)
{
color
=
zrColor
.
modifyAlpha
(
color
,
colorA
lpha
);
}
return
color
;
}
}
function
calculateBorderColor
(
borderColorS
,
thisNodeColor
)
{
function
calculateBorderColor
(
borderColorS
aturation
,
thisNodeColor
)
{
return
thisNodeColor
!=
null
?
zrColor
.
modifyHSL
(
thisNodeColor
,
null
,
null
,
borderColorS
)
?
zrColor
.
modifyHSL
(
thisNodeColor
,
null
,
null
,
borderColorS
aturation
)
:
null
;
}
...
...
@@ -152,8 +152,8 @@ define(function (require) {
visuals
.
color
!=
null
&&
visuals
.
color
!==
'
none
'
&&
(
getRangeVisual
(
nodeModel
,
'
colorA
'
)
||
getRangeVisual
(
nodeModel
,
'
colorS
'
)
getRangeVisual
(
nodeModel
,
'
colorA
lpha
'
)
||
getRangeVisual
(
nodeModel
,
'
colorS
aturation
'
)
)
);
...
...
src/component/dataRange/DataRangeModel.js
浏览文件 @
4f92e64e
...
...
@@ -50,10 +50,10 @@ define(function(require) {
categories
:
null
,
// 描述 category 数据。如:['some1', 'some2', 'some3'],设置后,min max失效。
dimension
:
null
,
inRange
:
null
,
// 'color', 'colorH', 'colorS
', 'colorL', 'colorA
',
inRange
:
null
,
// 'color', 'colorH', 'colorS
aturation', 'colorLightness', 'colorAlpha
',
// 'symbol', 'symbolSize'
outOfRange
:
null
,
// 'color', 'colorH', 'colorS
', 'colorL', 'colorA
',
outOfRange
:
null
,
// 'color', 'colorH', 'colorS
aturation', 'colorLightness', 'colorAlpha
',
// 'symbol', 'symbolSize'
orient
:
'
vertical
'
,
// 布局方式,默认为垂直布局,可选为:
...
...
@@ -378,7 +378,7 @@ define(function(require) {
var
itemSize
=
this
.
itemSize
;
var
visuals
=
controller
[
state
];
// Set inactive color for controller if no other color attr (like colorA) specified.
// Set inactive color for controller if no other color attr (like colorA
lpha
) specified.
if
(
!
visuals
)
{
visuals
=
controller
[
state
]
=
{
color
:
isCategory
?
inactiveColor
:
[
inactiveColor
]
...
...
src/component/dataRange/PiecewiseModel.js
浏览文件 @
4f92e64e
...
...
@@ -21,7 +21,7 @@ define(function(require) {
itemHeight
:
14
,
// 值域图形高度,线性渐变垂直布局高度为该值 * 10
itemSymbol
:
'
roundRect
'
,
splitList
:
null
,
// 值顺序:由高到低, item can be:
// {min, max, value, color, colorS
, colorA
, symbol, symbolSize}
// {min, max, value, color, colorS
aturation, colorAlpha
, symbol, symbolSize}
selectedMode
:
'
multiple
'
,
itemGap
:
10
// 各个item之间的间隔,单位px,默认为10,
// 横向布局时为水平间隔,纵向布局时为纵向间隔
...
...
src/component/tooltip.js
浏览文件 @
4f92e64e
...
...
@@ -229,8 +229,7 @@ define(function (require) {
*/
this
.
_lastHover
=
{
// data
// dataIndex
// seriesIndex
// payloadBatch
};
var
tooltipContent
=
this
.
_tooltipContent
;
...
...
@@ -727,35 +726,35 @@ define(function (require) {
var
rootTooltipModel
=
this
.
_tooltipModel
;
var
tooltipContent
=
this
.
_tooltipContent
;
var
data
=
seriesList
[
0
].
getData
();
var
baseAxis
=
coordSys
.
getBaseAxis
();
var
val
=
value
[
baseAxis
.
dim
===
'
x
'
?
0
:
1
];
var
dataIndex
=
data
.
indexOfNearest
(
baseAxis
.
dim
,
val
);
// FIXME
// Dont case by case
var
val
=
value
[
baseAxis
.
dim
===
'
x
'
||
baseAxis
.
dim
===
'
radius
'
?
0
:
1
];
var
payloadBatch
=
zrUtil
.
map
(
seriesList
,
function
(
series
)
{
return
{
seriesIndex
:
series
.
seriesIndex
,
dataIndex
:
series
.
getData
().
indexOfNearest
(
baseAxis
.
dim
,
val
)
};
});
var
api
=
this
.
_api
;
// FIXME Not here
var
lastHover
=
this
.
_lastHover
;
if
(
lastHover
.
seriesIndex
!=
null
&&
!
contentNotChange
)
{
if
(
lastHover
.
payloadBatch
&&
!
contentNotChange
)
{
this
.
_api
.
dispatchAction
({
type
:
'
downplay
'
,
seriesIndex
:
lastHover
.
seriesIndex
,
dataIndex
:
lastHover
.
dataIndex
batch
:
zrUtil
.
clone
(
lastHover
.
payloadBatch
,
true
)
});
}
// Dispatch highlight action
if
(
!
contentNotChange
)
{
var
seriesIndices
=
zrUtil
.
map
(
seriesList
,
function
(
series
)
{
return
series
.
seriesIndex
;
});
this
.
_api
.
dispatchAction
({
type
:
'
highlight
'
,
seriesIndex
:
seriesIndices
,
dataIndex
:
dataIndex
batch
:
zrUtil
.
clone
(
payloadBatch
,
true
)
});
lastHover
.
seriesIndex
=
seriesIndices
;
lastHover
.
dataIndex
=
dataIndex
;
lastHover
.
payloadBatch
=
payloadBatch
;
}
if
(
baseAxis
&&
rootTooltipModel
.
get
(
'
showContent
'
))
{
...
...
@@ -764,8 +763,8 @@ define(function (require) {
var
positionExpr
=
rootTooltipModel
.
get
(
'
position
'
);
var
html
;
var
paramsList
=
zrUtil
.
map
(
seriesList
,
function
(
series
)
{
return
series
.
getDataParams
(
dataIndex
);
var
paramsList
=
zrUtil
.
map
(
seriesList
,
function
(
series
,
index
)
{
return
series
.
getDataParams
(
payloadBatch
[
index
].
dataIndex
);
});
// If only one series
// FIXME
...
...
@@ -776,14 +775,16 @@ define(function (require) {
tooltipContent
.
show
(
rootTooltipModel
);
// Update html content
var
fitstDataIndex
=
payloadBatch
[
0
].
dataIndex
;
if
(
!
contentNotChange
)
{
// Reset ticket
this
.
_ticket
=
''
;
if
(
!
formatter
)
{
// Default tooltip content
html
=
data
.
getName
(
dataIndex
)
+
'
<br />
'
+
zrUtil
.
map
(
seriesList
,
function
(
series
)
{
return
series
.
formatTooltip
(
dataIndex
,
true
);
// FIXME shold be the first data which has name?
html
=
seriesList
[
0
].
getData
().
getName
(
fitstDataIndex
)
+
'
<br />
'
+
zrUtil
.
map
(
seriesList
,
function
(
series
,
index
)
{
return
series
.
formatTooltip
(
payloadBatch
[
index
].
dataIndex
,
true
);
}).
join
(
'
<br />
'
);
}
else
{
...
...
@@ -792,7 +793,7 @@ define(function (require) {
}
else
if
(
typeof
formatter
===
'
function
'
)
{
var
self
=
this
;
var
ticket
=
'
axis_
'
+
coordSys
.
name
+
'
_
'
+
d
ataIndex
;
var
ticket
=
'
axis_
'
+
coordSys
.
name
+
'
_
'
+
fitstD
ataIndex
;
var
callback
=
function
(
cbTicket
,
html
)
{
if
(
cbTicket
===
self
.
_ticket
)
{
tooltipContent
.
setContent
(
html
);
...
...
@@ -905,11 +906,10 @@ define(function (require) {
_resetLastHover
:
function
()
{
var
lastHover
=
this
.
_lastHover
;
if
(
lastHover
.
seriesIndex
!=
null
&&
lastHover
.
dataIndex
!=
null
)
{
if
(
lastHover
.
payloadBatch
)
{
this
.
_api
.
dispatchAction
({
type
:
'
downplay
'
,
seriesIndex
:
lastHover
.
seriesIndex
,
dataIndex
:
lastHover
.
dataIndex
batch
:
lastHover
.
payloadBatch
});
}
// Reset lastHover
...
...
src/coord/polar/AxisModel.js
浏览文件 @
4f92e64e
...
...
@@ -38,7 +38,8 @@ define(function(require) {
};
function
getAxisType
(
axisDim
,
option
)
{
return
option
.
type
||
(
axisDim
===
'
angle
'
?
'
category
'
:
'
value
'
);
// Default axis with data is category axis
return
option
.
type
||
(
option
.
data
?
'
category
'
:
'
value
'
);
}
axisModelCreator
(
'
angle
'
,
PolarAxisModel
,
getAxisType
,
polarAxisDefaultExtendedOption
.
angle
);
...
...
src/echarts.js
浏览文件 @
4f92e64e
...
...
@@ -328,10 +328,12 @@ define(function (require) {
ecModel
.
eachComponent
(
{
mainType
:
'
series
'
,
query
:
payload
},
function
(
seriesModel
)
{
function
(
seriesModel
,
index
,
payloadInfo
)
{
var
chartView
=
this
.
_chartsMap
[
seriesModel
.
id
];
if
(
chartView
)
{
chartView
[
method
](
seriesModel
,
ecModel
,
this
.
_api
,
payload
);
chartView
[
method
](
seriesModel
,
ecModel
,
this
.
_api
,
payloadInfo
);
}
},
this
...
...
src/model/Global.js
浏览文件 @
4f92e64e
...
...
@@ -237,14 +237,37 @@ define(function (require) {
* {mainType: 'dataZoom', query: {dataZoomId: 'abc'}},
* function (model, index) {...}
* );
*
* findComponents(
* {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}},
* function (model, index) {...}
* );
* findComponents(
*
* var result = findComponents(
* {mainType: 'series'},
* function (model, index) {...}
* );
* // result like [component0, componnet1, ...]
*
* var result = findComponents(
* {mainType: 'series', query: {
* type: 'someAction'
* batch: [
* {seriesId: 'asdf', dataIndex: 6},
* {seriesId: 'qwer', dataIndex: 4},
* ...
* ]
* }}
* )
* result like [component0, component1, component2]
* result.batchQueries like [
* {type: 'someAction', seriesId: 'qwer', dataIndex: 4},
* {type: 'someAction', seriesId: 'qwer', dataIndex: 4},
* {type: 'someAction', seriesId: 'asdf', dataIndex: 6},
* ...
* ]
* where each item of batchQueryies is coresponding to each item of result.
*
*
* @param {Object} condition
* @param {string} condition.mainType Mandatory.
...
...
@@ -254,31 +277,55 @@ define(function (require) {
* If query attribute is null/undefined, do not filtering by
* query conditions, which is convenient for no-payload
* situations like visual coding, layout.
* If query.batch is an array, query by each batch item.
* @param {Function} [condition.filter] parameter: component, return boolean.
* @return {Array.<module:echarts/model/Component>} If condition.query.batch
* exist, result by batch is stored on 'batch' prop of returned array,
* see example above;
*/
findComponents
:
function
(
condition
)
{
var
mainType
=
condition
.
mainType
;
var
query
=
condition
.
query
;
var
result
;
if
(
query
)
{
condition
.
index
=
query
[
mainType
+
'
Index
'
];
condition
.
id
=
query
[
mainType
+
'
Id
'
];
condition
.
name
=
query
[
mainType
+
'
Name
'
];
var
mainType
=
condition
.
mainType
;
var
subType
=
condition
.
subType
;
result
=
this
.
queryComponents
(
condition
);
if
(
!
query
)
{
return
doFilter
(
filterBySubType
(
this
.
_componentsMap
[
mainType
],
condition
));
}
else
if
(
query
.
batch
)
{
var
result
=
[];
var
batchQueries
=
result
.
batchQueries
=
[];
each
(
query
.
batch
,
function
(
batchItem
)
{
batchItem
=
zrUtil
.
defaults
(
zrUtil
.
extend
({},
batchItem
),
query
);
batchItem
.
batch
=
null
;
var
res
=
doFilter
(
this
.
queryComponents
(
getCond
(
batchItem
)));
each
(
res
,
function
(
re
)
{
result
.
push
(
re
);
batchQueries
.
push
(
batchItem
);
});
},
this
);
return
result
;
}
else
{
result
=
filterBySubType
(
this
.
_componentsMap
[
mainType
],
condition
);
return
doFilter
(
this
.
queryComponents
(
getCond
(
query
)));
}
if
(
condition
.
filter
)
{
result
=
filter
(
result
,
condition
.
filter
);
function
getCond
(
q
)
{
return
{
mainType
:
mainType
,
subType
:
subType
,
index
:
q
[
mainType
+
'
Index
'
],
id
:
q
[
mainType
+
'
Id
'
],
name
:
q
[
mainType
+
'
Name
'
]
};
}
return
result
;
function
doFilter
(
res
)
{
return
condition
.
filter
?
filter
(
res
,
condition
.
filter
)
:
res
;
}
},
/**
...
...
@@ -292,12 +339,17 @@ define(function (require) {
* });
* eachComponent(
* {mainType: 'dataZoom', query: {dataZoomId: 'abc'}},
* function (model, index) {...}
* function (model, index
, queryInfo
) {...}
* );
* eachComponent(
* {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}},
* function (model, index) {...}
* function (model, index, queryInfo) {...}
* );
* eachComponent(
* {mainType: 'series', subType: 'pie', query: {batch: [ ... ]}},
* function (model, index, queryInfo) {...}
* );
* where query info is always an object but not null.
*
* @param {string|Object=} mainType When mainType is object, the definition
* is the same as the method 'findComponents'.
...
...
@@ -317,10 +369,19 @@ define(function (require) {
});
}
else
if
(
zrUtil
.
isString
(
mainType
))
{
each
(
componentsMap
[
mainType
],
cb
,
context
);
each
(
componentsMap
[
mainType
],
function
(
cpt
,
index
)
{
cb
.
call
(
context
,
cpt
,
index
,
{});
},
context
);
}
else
if
(
isObject
(
mainType
))
{
each
(
this
.
findComponents
(
mainType
),
cb
,
context
);
var
queryResult
=
this
.
findComponents
(
mainType
);
each
(
queryResult
,
function
(
cpt
,
index
)
{
var
batchQueries
=
queryResult
.
batchQueries
;
cb
.
call
(
context
,
cpt
,
index
,
batchQueries
?
batchQueries
[
index
]
:
mainType
.
query
);
});
}
},
...
...
@@ -661,7 +722,7 @@ define(function (require) {
* @inner
*/
function
filterBySubType
(
components
,
condition
)
{
return
condition
.
hasOwnProperty
(
'
subType
'
)
return
condition
.
subType
!==
void
0
?
filter
(
components
,
function
(
cpt
)
{
return
cpt
.
subType
===
condition
.
subType
;
})
...
...
src/visual/VisualMapping.js
浏览文件 @
4f92e64e
...
...
@@ -131,15 +131,15 @@ define(function (require) {
}
},
colorS
:
makePartialColorVisualHandler
(
function
(
color
,
value
)
{
colorS
aturation
:
makePartialColorVisualHandler
(
function
(
color
,
value
)
{
return
zrColor
.
modifyHSL
(
color
,
null
,
value
);
}),
colorL
:
makePartialColorVisualHandler
(
function
(
color
,
value
)
{
colorL
ightness
:
makePartialColorVisualHandler
(
function
(
color
,
value
)
{
return
zrColor
.
modifyHSL
(
color
,
null
,
null
,
value
);
}),
colorA
:
makePartialColorVisualHandler
(
function
(
color
,
value
)
{
colorA
lpha
:
makePartialColorVisualHandler
(
function
(
color
,
value
)
{
return
zrColor
.
modifyAlpha
(
color
,
value
);
}),
...
...
@@ -400,7 +400,7 @@ define(function (require) {
};
/**
* 'color', 'colorS
', 'colorA
', ... are in the same visualCluster named 'color'.
* 'color', 'colorS
aturation', 'colorAlpha
', ... are in the same visualCluster named 'color'.
* Other visuals are in the cluster named as the same as theirselves.
*
* @public
...
...
@@ -432,11 +432,11 @@ define(function (require) {
};
/**
* Give order to visual types, considering colorS
, colorA
depends on color.
* Give order to visual types, considering colorS
aturation, colorAlpha
depends on color.
*
* @public
* @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorS: ...}
* IF Array, like: ['color', 'symbol', 'colorS']
* @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorS
aturation
: ...}
* IF Array, like: ['color', 'symbol', 'colorS
aturation
']
* @return {Array.<string>} Sorted visual types.
*/
VisualMapping
.
prepareVisualTypes
=
function
(
visualTypes
)
{
...
...
@@ -455,7 +455,7 @@ define(function (require) {
}
visualTypes
.
sort
(
function
(
type1
,
type2
)
{
// color should be front of colorS
, colorA
, ...
// color should be front of colorS
aturation, colorAlpha
, ...
// symbol and symbolSize do not matter.
return
(
type2
===
'
color
'
&&
type1
!==
'
color
'
&&
type1
.
indexOf
(
'
color
'
)
===
0
)
?
1
:
-
1
;
...
...
src/visual/visualDefault.js
浏览文件 @
4f92e64e
...
...
@@ -30,17 +30,17 @@ define(function (require) {
inactive
:
[
'
rgba(0,0,0,0)
'
]
},
colorS
:
{
colorS
aturation
:
{
active
:
[
0.3
,
1
],
inactive
:
[
0
,
0
]
},
colorL
:
{
colorL
ightness
:
{
active
:
[
0.9
,
0.5
],
inactive
:
[
0
,
0
]
},
colorA
:
{
colorA
lpha
:
{
active
:
[
0.3
,
1
],
inactive
:
[
0
,
0
]
},
...
...
test/color-mix-aqi.html
浏览文件 @
4f92e64e
...
...
@@ -182,7 +182,7 @@
color
:
'
#fff
'
},
inRange
:
{
colorL
:
[
1
,
.
5
]
colorL
ightness
:
[
1
,
.
5
]
},
outOfRange
:
{
color
:
[
'
rgba(255,255,255,.2)
'
]
...
...
test/connect2.html
浏览文件 @
4f92e64e
...
...
@@ -66,7 +66,7 @@
option1
.
dataRange
.
max
=
250
;
option2
.
dataRange
.
inRange
=
{
colorL
:
[
1
,
0.5
]
colorL
ightness
:
[
1
,
0.5
]
};
option2
.
dataRange
.
outOfRange
=
{
color
:
[
'
rgba(255,255,255,.2)
'
]
...
...
test/dataRange-scatter-alpha.html
浏览文件 @
4f92e64e
...
...
@@ -91,7 +91,7 @@
color
:
[
'
rgb(20,1,0)
'
]
},
outOfRange
:
{
colorA
:
[
0.3
,
1
]
colorA
lpha
:
[
0.3
,
1
]
}
}
],
...
...
test/dataRange-scatter-layout1-text.html
浏览文件 @
4f92e64e
...
...
@@ -138,7 +138,7 @@
text
:
[
'
高
'
,
'
低
'
],
backgroundColor
:
'
#eee
'
,
visualSelected
:
{
type
:
'
colorS
'
type
:
'
colorS
aturation
'
}
},
{
...
...
@@ -152,7 +152,7 @@
text
:
[
'
高
'
,
'
低
'
],
backgroundColor
:
'
#eee
'
,
visualSelected
:
{
type
:
'
colorL
'
type
:
'
colorL
ightness
'
}
},
{
...
...
@@ -165,7 +165,7 @@
text
:
[
'
高
'
,
'
低
'
],
backgroundColor
:
'
#eee
'
,
visualSelected
:
{
type
:
'
colorA
'
type
:
'
colorA
lpha
'
}
}
],
...
...
test/dataRange-scatter-layout1.html
浏览文件 @
4f92e64e
...
...
@@ -134,7 +134,7 @@
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
visualSelected
:
{
type
:
'
colorS
'
type
:
'
colorS
aturation
'
}
},
{
...
...
@@ -147,7 +147,7 @@
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
visualSelected
:
{
type
:
'
colorL
'
type
:
'
colorL
ightness
'
}
},
{
...
...
@@ -159,7 +159,7 @@
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
visualSelected
:
{
type
:
'
colorA
'
type
:
'
colorA
lpha
'
}
}
],
...
...
test/dataRange-scatter-layout2-text.html
浏览文件 @
4f92e64e
...
...
@@ -142,7 +142,7 @@
inverse
:
true
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorS
'
inRange
:
'
colorS
aturation
'
},
{
x
:
'
right
'
,
...
...
@@ -155,7 +155,7 @@
selectedMode
:
'
multiple
'
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorL
'
inRange
:
'
colorL
ightness
'
},
{
y
:
40
,
...
...
@@ -167,7 +167,7 @@
selectedMode
:
'
multiple
'
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorA
'
inRange
:
'
colorA
lpha
'
},
{
x
:
'
center
'
,
...
...
@@ -180,7 +180,7 @@
selectedMode
:
'
multiple
'
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorA
'
inRange
:
'
colorA
lpha
'
}
],
series
:
[
...
...
test/dataRange-scatter-layout2.html
浏览文件 @
4f92e64e
...
...
@@ -138,7 +138,7 @@
inverse
:
true
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorS
'
inRange
:
'
colorS
aturation
'
},
{
x
:
'
right
'
,
...
...
@@ -150,7 +150,7 @@
selectedMode
:
'
multiple
'
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorL
'
inRange
:
'
colorL
ightness
'
},
{
y
:
40
,
...
...
@@ -161,7 +161,7 @@
selectedMode
:
'
multiple
'
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorA
'
inRange
:
'
colorA
lpha
'
},
{
x
:
'
center
'
,
...
...
@@ -173,7 +173,7 @@
selectedMode
:
'
multiple
'
,
dimension
:
'
dim3
'
,
backgroundColor
:
'
#eee
'
,
inRange
:
'
colorA
'
inRange
:
'
colorA
lpha
'
}
],
series
:
[
...
...
test/graph.html
浏览文件 @
4f92e64e
...
...
@@ -62,7 +62,7 @@
dataRange
:
{
max
:
100
,
inRange
:
{
colorS
:
[
1
,
0.3
]
colorS
aturation
:
[
1
,
0.3
]
}
},
animationDurationUpdate
:
1500
,
...
...
test/treemap-disk.html
浏览文件 @
4f92e64e
...
...
@@ -119,11 +119,11 @@
}
},
{
colorS
:
[
0.35
,
0.5
],
colorS
aturation
:
[
0.35
,
0.5
],
itemStyle
:
{
normal
:
{
gapWidth
:
1
,
borderColorS
:
0.6
borderColorS
aturation
:
0.6
}
}
}
...
...
test/treemap-obama.html
浏览文件 @
4f92e64e
...
...
@@ -220,7 +220,7 @@
}
},
{
colorA
:
mode
===
2
colorA
lpha
:
mode
===
2
?
[
0.5
,
1
]
:
null
,
itemStyle
:
{
normal
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录