Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
li_dai
echarts
提交
63dd98ac
E
echarts
项目概览
li_dai
/
echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
63dd98ac
编写于
11月 08, 2022
作者:
P
plainheart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style: fix code style flaw and remove unnecessary default parameter. (#17098)
上级
0f149dc8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
75 addition
and
80 deletion
+75
-80
src/chart/bar/BaseBarSeries.ts
src/chart/bar/BaseBarSeries.ts
+5
-1
src/component/marker/MarkAreaView.ts
src/component/marker/MarkAreaView.ts
+1
-1
src/model/Series.ts
src/model/Series.ts
+2
-1
test/bar-markArea.html
test/bar-markArea.html
+67
-77
未找到文件。
src/chart/bar/BaseBarSeries.ts
浏览文件 @
63dd98ac
...
...
@@ -86,7 +86,11 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri
return
createSeriesData
(
null
,
this
,
{
useEncodeDefaulter
:
true
});
}
getMarkerPosition
(
value
:
ScaleDataValue
[],
dims
?:
typeof
dimPermutations
[
number
],
startingAtTick
:
boolean
=
false
)
{
getMarkerPosition
(
value
:
ScaleDataValue
[],
dims
?:
typeof
dimPermutations
[
number
],
startingAtTick
?:
boolean
)
{
const
coordSys
=
this
.
coordinateSystem
;
if
(
coordSys
&&
coordSys
.
clampData
)
{
// PENDING if clamp ?
...
...
src/component/marker/MarkAreaView.ts
浏览文件 @
63dd98ac
...
...
@@ -183,7 +183,7 @@ function getSingleMarkerEndPoint(
else
{
pointValue
[
1
]
=
(
clampPointValue0
[
1
]
>
clampPointValue1
[
1
])
?
pointValue0
[
1
]
:
pointValue1
[
1
];
}
// Use the getMarkerPo
i
sition
// Use the getMarkerPosition
point
=
seriesModel
.
getMarkerPosition
(
pointValue
,
dims
,
true
);
...
...
src/model/Series.ts
浏览文件 @
63dd98ac
...
...
@@ -103,7 +103,8 @@ interface SeriesModel {
getMarkerPosition
(
value
:
ScaleDataValue
[],
dims
?:
typeof
dimPermutations
[
number
],
startingAtTick
?:
boolean
):
number
[];
startingAtTick
?:
boolean
):
number
[];
/**
* Get legend icon symbol according to each series type
...
...
test/bar-markArea.html
浏览文件 @
63dd98ac
...
...
@@ -25,7 +25,6 @@ under the License.
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<script
src=
"lib/simpleRequire.js"
></script>
<script
src=
"lib/config.js"
></script>
<script
src=
"lib/jquery.min.js"
></script>
<script
src=
"lib/facePrint.js"
></script>
<script
src=
"lib/testHelper.js"
></script>
<!-- <script src="ut/lib/canteen.js"></script> -->
...
...
@@ -43,137 +42,128 @@ under the License.
<script>
require
([
'
echarts
'
,
// 'map/js/china',
// './data/nutrients.json'
'
echarts
'
],
function
(
echarts
)
{
var
option
;
option
=
{
xAxis
:
{
xAxis
:
{
type
:
'
category
'
,
data
:
[
'
Mon
'
,
'
Tue
'
,
'
Wed
'
,
'
Thu
'
,
'
Fri
'
,
'
Sat
'
,
'
Sun
'
]
},
yAxis
:
{
},
yAxis
:
{
type
:
'
value
'
},
series
:
[
},
series
:
[
{
data
:
[
120
,
200
,
150
,
80
,
70
,
110
,
130
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
120
,
200
,
150
,
80
,
70
,
110
,
130
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
[
[
{
name
:
'
Invert input
'
,
xAxis
:
'
Thu
'
name
:
'
Invert input
'
,
xAxis
:
'
Thu
'
},
{
xAxis
:
'
Mon
'
xAxis
:
'
Mon
'
}
]
]
]
}
}
},
{
data
:
[
120
,
200
,
150
,
80
,
70
,
110
,
130
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
120
,
200
,
150
,
80
,
70
,
110
,
130
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
[
[
{
name
:
'
Single Emphasis
'
,
xAxis
:
'
Sun
'
name
:
'
Single Emphasis
'
,
xAxis
:
'
Sun
'
},
{
xAxis
:
'
Sun
'
xAxis
:
'
Sun
'
}
]
]
]
}
}
}
]
]
};
var
chart
=
testHelper
.
create
(
echarts
,
'
main0
'
,
{
title
:
[
`MarkArea should
be covering the 'Mon' to 'Thu' area and 'Sun'
area`
,
`MarkArea should
cover the **'Mon'** to **'Thu'** area and **'Sun'**
area`
,
`rather than area between bars inside. (See issue#12341)`
],
option
:
option
// height: 300,
// buttons: [{text: 'btn-txt', onclick: function () {}}],
// recordCanvas: true,
});
});
</script>
<script>
require
([
'
echarts
'
,
// 'map/js/china',
// './data/nutrients.json'
'
echarts
'
],
function
(
echarts
)
{
var
option
;
option
=
{
xAxis
:
{
xAxis
:
{
type
:
'
category
'
,
data
:
[
'
Mon
'
,
'
Tue
'
,
'
Wed
'
,
'
Thu
'
,
'
Fri
'
,
'
Sat
'
,
'
Sun
'
]
},
yAxis
:
{
},
yAxis
:
{
type
:
'
category
'
,
data
:
[
'
Sleep
'
,
'
Exercise
'
,
'
Gardening
'
,
'
Gaming
'
,
'
Work
'
]
},
series
:
[
},
series
:
[
{
data
:
[
'
Work
'
,
'
Exercise
'
,
'
Work
'
,
'
Gardening
'
,
'
Gaming
'
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
[
{
name
:
'
Dual Axes specified Emphasis
'
,
xAxis
:
'
Fri
'
,
yAxis
:
'
Work
'
},
{
xAxis
:
'
Mon
'
,
yAxis
:
'
Gardening
'
}
]
]
}
data
:
[
'
Work
'
,
'
Exercise
'
,
'
Work
'
,
'
Gardening
'
,
'
Gaming
'
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
[
{
name
:
'
Dual Axes specified Emphasis
'
,
xAxis
:
'
Fri
'
,
yAxis
:
'
Work
'
},
{
xAxis
:
'
Mon
'
,
yAxis
:
'
Gardening
'
}
]
]
}
},
{
data
:
[
'
Gardening
'
,
'
Work
'
,
'
Exercise
'
,
'
Exercise
'
,
'
Gardening
'
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
[
{
name
:
'
Coord specified Emphasis
'
,
coord
:
[
'
Mon
'
,
'
Exercise
'
]
},
{
coord
:
[
'
Tue
'
,
'
Gardening
'
]
}
]
]
}
data
:
[
'
Gardening
'
,
'
Work
'
,
'
Exercise
'
,
'
Exercise
'
,
'
Gardening
'
],
type
:
'
bar
'
,
markArea
:
{
data
:
[
[
{
name
:
'
Coord specified Emphasis
'
,
coord
:
[
'
Mon
'
,
'
Exercise
'
]
},
{
coord
:
[
'
Tue
'
,
'
Gardening
'
]
}
]
]
}
}
]
]
};
var
chart
=
testHelper
.
create
(
echarts
,
'
main1
'
,
{
title
:
[
`MarkArea should
be covering the 'Mon' to 'Fri' area and 'Exercise' to 'Gaming'
area`
,
`MarkArea should
cover the **'Mon'** to **'Fri'** area and **'Exercise'** to **'Gaming'**
area`
,
`rather than area between bars inside. (Dual category axes for bar chart is rare)`
],
option
:
option
// height: 300,
// buttons: [{text: 'btn-txt', onclick: function () {}}],
// recordCanvas: true,
});
});
</script>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录