Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
96f2fae1
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,发现更多精彩内容 >>
提交
96f2fae1
编写于
2月 26, 2018
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix radar.
上级
dde51711
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
14 deletion
+12
-14
src/chart/radar/RadarSeries.js
src/chart/radar/RadarSeries.js
+1
-2
src/data/helper/completeDimensions.js
src/data/helper/completeDimensions.js
+9
-8
src/data/helper/createDimensions.js
src/data/helper/createDimensions.js
+2
-4
未找到文件。
src/chart/radar/RadarSeries.js
浏览文件 @
96f2fae1
...
...
@@ -23,8 +23,7 @@ var RadarSeries = SeriesModel.extend({
getInitialData
:
function
(
option
,
ecModel
)
{
return
createListSimply
(
this
,
{
extraPrefix
:
'
indicator_
'
,
extraFromZero
:
true
generateCoord
:
'
indicator_
'
});
},
...
...
src/data/helper/completeDimensions.js
浏览文件 @
96f2fae1
...
...
@@ -29,11 +29,11 @@ import {OTHER_DIMENSIONS} from './dimensionHelper';
* @param {Array.<Object|string>} [opt.dimsDef] option.series.dimensions User defined dimensions
* For example: ['asdf', {name, type}, ...].
* @param {Object|HashMap} [opt.encodeDef] option.series.encode {x: 2, y: [3, 1], tooltip: [1, 2], label: 3}
* @param {string} [opt.
extraPrefix] Prefix of name when filling the left dimensions
.
*
@param {string} [opt.extraFromZero] If specified, extra
dim names will be:
*
extraPrefix + 0, extraPrefix + extraBaseIndex + 1
...
*
If not specified, extra dim names will be:
*
extraPrefix, extraPrefix + 0, extraPrefix + 1
...
* @param {string} [opt.
generateCoord] Generate coord dim with the given prefix
.
*
The generated
dim names will be:
*
generateCoord + 0, generateCoord + 1,
...
* If not specified, extra dim names will be:
*
'value', 'value0', 'value1',
...
* @param {number} [opt.dimCount] If not specified, guess by the first data item.
* @param {number} [opt.encodeDefaulter] If not specified, auto find the next available data dim.
* @return {Array.<Object>} [{
...
...
@@ -162,7 +162,8 @@ function completeDimensions(sysDims, source, opt) {
}
// Make sure the first extra dim is 'value'.
var
extra
=
opt
.
extraPrefix
||
'
value
'
;
var
doesGenerateCoord
=
!!
opt
.
generateCoord
;
var
extra
=
opt
.
generateCoord
||
'
value
'
;
// Set dim `name` and other `coordDim` and other props.
for
(
var
resultDimIdx
=
0
;
resultDimIdx
<
dimCount
;
resultDimIdx
++
)
{
...
...
@@ -171,10 +172,10 @@ function completeDimensions(sysDims, source, opt) {
if
(
coordDim
==
null
)
{
resultItem
.
coordDim
=
genName
(
extra
,
coordDimNameMap
,
opt
.
extraFromZero
extra
,
coordDimNameMap
,
doesGenerateCoord
);
resultItem
.
coordDimIndex
=
0
;
resultItem
.
isExtraCoord
=
true
;
resultItem
.
isExtraCoord
=
!
doesGenerateCoord
;
}
resultItem
.
name
==
null
&&
(
resultItem
.
name
=
genName
(
...
...
src/data/helper/createDimensions.js
浏览文件 @
96f2fae1
...
...
@@ -9,8 +9,7 @@ import completeDimensions from './completeDimensions';
* @param {Object|Array} [opt]
* @param {Array.<string|Object>} [opt.coordDimensions=[]]
* @param {number} [opt.dimensionsCount]
* @param {string} [opt.extraPrefix]
* @param {boolean} [opt.extraFromZero]
* @param {string} [opt.generateCoord]
* @param {Array.<string|Object>} [opt.dimensionsDefine=source.dimensionsDefine] Overwrite source define.
* @param {Object|HashMap} [opt.encodeDefine=source.encodeDefine] Overwrite source define.
* @return {Array.<Object>} dimensionsInfo
...
...
@@ -21,7 +20,6 @@ export default function (source, opt) {
dimsDef
:
opt
.
dimensionsDefine
||
source
.
dimensionsDefine
,
encodeDef
:
opt
.
encodeDefine
||
source
.
encodeDefine
,
dimCount
:
opt
.
dimensionsCount
,
extraPrefix
:
opt
.
extraPrefix
,
extraFromZero
:
opt
.
extraFromZero
generateCoord
:
opt
.
generateCoord
});
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录