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/05/09 07:49:56 UTC

[GitHub] [echarts] PPPartric opened a new issue #14896: lines自定义坐标轴后,y轴坐标点位会四舍五入到对应y轴上。

PPPartric opened a new issue #14896:
URL: https://github.com/apache/echarts/issues/14896


   ## 问题简述 (One-line summary)
     由于需要使用动效光束追踪效果,我在使用lines来画折线图后发现渲染出来的Y轴上的值会四舍五入到相应的y轴点位上(如我设置y轴的系列为[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20],然后在渲染y值为15的时候会跑到16的点位上)
   
   ## 版本及环境 (Version & Environment)
    * ECharts 版本 (ECharts version):  v5.1.1
    * 浏览器类型和版本 (Browser version): Google Chrome  版本 89.0.4389.114
    * 操作系统类型和版本 (OS Version):  macOS  11.2.3
    * 重现步骤 (Steps to reproduce)
    * 期望结果 (Expected behaviour)
           渲染出来的位置应该在对应的值的同一轴线上。
   
   ## 可能哪里有问题 (What went wrong)
   ## ECharts配置项 (ECharts option)
   `const dataPath = [
     {
       coords: [
         ['0时', 0],
         ['4时', 2]
       ]
     },
     {
       coords: [
         ['4时', 2],
         ['8时', 6]
       ]
     },
     {
       coords: [
         ['8时', 6],
         ['12时', 7.5]
       ]
     },
     {
       coords: [
         ['12时', 7.5],
         ['24时', 10]
       ]
     }
   ]
   const animatePath = [
     ['0时', 0],
     ['4时', 2],
     ['8时', 6],
     ['12时', 7.5],
     ['24时', 10]
   ]
   
   option = {
     xAxis: {
       boundaryGap: false,
       splitLine: {
         show: true,
         lineStyle: {
           color: '#7b7b7b'
         }
       },
       axisLabel: {
         fontSize: '26px',
         color: '#5f85bc'
       },
       axisTick: {
         show: false
       },
       data: ['0时', '4时', '8时', '12时', '16时', '20时', '24时']
     },
     yAxis: {
       boundaryGap: false,
       splitLine: {
         show: true,
         lineStyle: {
           color: '#7b7b7b'
         }
       },
       axisLabel: {
         fontSize: '26px',
         color: '#5f85bc'
       },
       axisTick: {
         show: false
       },
       data: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
     },
     series: [
       {
         data: [0, 2, 6, 7.5, 8, 8.6, 10],
         type: 'line'
         // symbolSize: 10
       },
       {
         type: 'lines',
         animation: false,
         coordinateSystem: 'cartesian2d',
         lineStyle: {
           width: 4
         },
         label: {
           show: true,
           formatter: 'asdfdsafda'
         },
         markLine: {
           precision: 0.0001
         },
         data: dataPath
       },
       {
         type: 'lines',
         coordinateSystem: 'cartesian2d',
         polyline: true,
         lineStyle: {
           width: 0
         },
         effect: {
           constantSpeed: 100,
           show: true,
           trailLength: 0.4,
           symbolSize: 5
         },
         data: [
           {
             coords: animatePath
           }
         ],
         zlevel: 1
       }
     ]
   }
   `
   ## 其他信息 (Other comments)


-- 
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


[GitHub] [echarts] echarts-bot[bot] commented on issue #14896: lines自定义坐标轴后,y轴坐标点位会四舍五入到对应y轴上。

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14896:
URL: https://github.com/apache/echarts/issues/14896#issuecomment-835731846


   This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. 🙊
   Sorry for this, but it helps save our maintainers' time so that more developers get helped.
   Feel free to create another issue using the issue template.
   
   If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again.
   
   这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。
   为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。
   如果您愿意,请使用 issue 模板重新创建 issue。
   
   如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。


-- 
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


[GitHub] [echarts] echarts-bot[bot] closed issue #14896: lines自定义坐标轴后,y轴坐标点位会四舍五入到对应y轴上。

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] closed issue #14896:
URL: https://github.com/apache/echarts/issues/14896


   


-- 
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