You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/06/21 04:43:32 UTC
[GitHub] [echarts] elewen edited a comment on issue #15175: markLine 的线条无法设置使其显示在 serise 下方
elewen edited a comment on issue #15175:
URL: https://github.com/apache/echarts/issues/15175#issuecomment-864721976
> @elewen Hi, 可以给个具体的例子吗,我这边试了下没有问题:
>
> **option配置**
>
> ```js
> option = {
> xAxis: {
> type: "category",
> data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
> },
> yAxis: {},
> series: [
>
> {
> data: [1820, 932, 901, 934, 1290, 1330, 11320],
> type: "line",
> markLine: {
> data: [{
> type: "average",
> lineStyle: {
> type: 'solid',
> width: 3,
> }
> }],
> silent: true
> }
> },
> {
> z:10,
> data: [20, 1932, 1901, 9314, 12190, 13310, 13120],
> type: "line",
> lineStyle: {
> width: 5,
> },
> markLine: {
> data: [{
> type: "average",
> lineStyle: {
> type: 'solid',
> width: 3,
> }
> }],
> silent: true
> }
> }
>
> ]
> }
> ```
>
> **效果:**
> 绿色series(z为10),显示在蓝色series的markLine上方
>
> 
感谢回复,根据你给出的配置经过测试后已解决了我的问题。
我总共有4个 serise,其中一个是markLine所在的 serise,另外三个series 是三条折线图。我又试了好几次,发现其他三个系列的z必须大于等于5、markline所在的 series 不设置z或者设置小于其他几个的z的时候才能成功覆盖;如果单独只给markline所在的 serise设置小于2的z值或者负数z值,而不给其他series指定z值,也无法实现覆盖。不知道这个覆盖逻辑是怎么规定和计算的,没找到相关说明。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org