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 2020/06/10 09:22:26 UTC

[GitHub] [incubator-echarts] jkwf opened a new issue #12789: 使用pictorialBar,symbolOffset: [0, '-50%'], 当data中第一个值为0的时候,位置出现偏差,显示在左上角

jkwf opened a new issue #12789:
URL: https://github.com/apache/incubator-echarts/issues/12789


   ### Version
   4.8.0
   
   ### Reproduction link
   [https://gallery.echartsjs.com/editor.html?c=xYKFsmdRIF&comment=0](https://gallery.echartsjs.com/editor.html?c=xYKFsmdRIF&comment=0)
   
   ### Steps to reproduce
   // 多系列无法定位
   
   var colors = [{
       type: 'linear',
       x: 0, x2: 1, y: 0, y2: 0,
       colorStops: [{
           offset: 0,
           color: '#27f7fa'
       }, {
           offset: 0.5,
           color: '#27f7fa'
       }, {
           offset: 0.5,
           color: '#23c3e2dd'
       }, {
           offset: 1,
           color: '#23c3e2dd'
       }]
   }, {
       type: 'linear',
       x: 0, x2: 1, y: 0, y2: 0,
       colorStops: [{
           offset: 0,
           color: '#7153d3aa'
       }, {
           offset: 0.5,
           color: '#7153d3aa'
       }, {
           offset: 0.5,
           color: '#352a6b'
       }, {
           offset: 1,
           color: '#352a6b'
       }]
   }];
   
   var barWidth = 30;
   
   option = {
       title: {
           text: 'Awesome Chart'
       },
       xAxis: {
           data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
       },
       yAxis: {},
       series: [{
           z:1,
           type: 'bar',
           barWidth:barWidth,
           data:[0, 182, 191, 234, 290, 330, 310],
           itemStyle:{
               normal:{
                   color:colors[1]
               }
           },
       },{
           z:2,
           name:'底部',
           type:'pictorialBar',
           data :[1, 1, 1, 1, 1, 1, 1],
           symbol :'diamond',
           symbolOffset:[0,'50%'],
           symbolSize:[barWidth,10],
           itemStyle:{
               normal:{
                   color:colors[1]
               }
           },
       },{
           z:3,
           name:'上部1',
           type:'pictorialBar',
           symbolPosition:'end',
           data:[0, 182, 191, 234, 290, 330, 310],
           symbol :'diamond',
           symbolOffset:[0,'-50%'],
           symbolSize:[barWidth - 4,10 * (barWidth - 4) / barWidth],
           itemStyle:{
               normal:{
                   borderColor: '#7153d3',
                   borderWidth: 2,
                   color:'#352a6b'
               }
           },
       }]
   };
   
   ### What is expected?
   为0值时,正常显示
   When it is 0, it will display normally
   
   ### What is actually happening?
   位置显示错乱
   Disordered position display
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   


----------------------------------------------------------------
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] [incubator-echarts] jkwf commented on issue #12789: 使用pictorialBar,symbolOffset: [0, '-50%'], 当data中第一个值为0的时候,位置出现偏差,显示在左上角

Posted by GitBox <gi...@apache.org>.
jkwf commented on issue #12789:
URL: https://github.com/apache/incubator-echarts/issues/12789#issuecomment-643026039


   > ### Version
   > 4.8.0
   > 
   > ### Reproduction link
   > https://gallery.echartsjs.com/editor.html?c=xYKFsmdRIF&comment=0
   > 
   > ### Steps to reproduce
   > // 多系列无法定位
   > 
   > var colors = [{
   > type: 'linear',
   > x: 0, x2: 1, y: 0, y2: 0,
   > colorStops: [{
   > offset: 0,
   > color: '#27f7fa'
   > }, {
   > offset: 0.5,
   > color: '#27f7fa'
   > }, {
   > offset: 0.5,
   > color: '#23c3e2dd'
   > }, {
   > offset: 1,
   > color: '#23c3e2dd'
   > }]
   > }, {
   > type: 'linear',
   > x: 0, x2: 1, y: 0, y2: 0,
   > colorStops: [{
   > offset: 0,
   > color: '#7153d3aa'
   > }, {
   > offset: 0.5,
   > color: '#7153d3aa'
   > }, {
   > offset: 0.5,
   > color: '#352a6b'
   > }, {
   > offset: 1,
   > color: '#352a6b'
   > }]
   > }];
   > 
   > var barWidth = 30;
   > 
   > option = {
   > title: {
   > text: 'Awesome Chart'
   > },
   > xAxis: {
   > data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
   > },
   > yAxis: {},
   > series: [{
   > z:1,
   > type: 'bar',
   > barWidth:barWidth,
   > data:[0, 182, 191, 234, 290, 330, 310],
   > itemStyle:{
   > normal:{
   > color:colors[1]
   > }
   > },
   > },{
   > z:2,
   > name:'底部',
   > type:'pictorialBar',
   > data :[1, 1, 1, 1, 1, 1, 1],
   > symbol :'diamond',
   > symbolOffset:[0,'50%'],
   > symbolSize:[barWidth,10],
   > itemStyle:{
   > normal:{
   > color:colors[1]
   > }
   > },
   > },{
   > z:3,
   > name:'上部1',
   > type:'pictorialBar',
   > symbolPosition:'end',
   > data:[0, 182, 191, 234, 290, 330, 310],
   > symbol :'diamond',
   > symbolOffset:[0,'-50%'],
   > symbolSize:[barWidth - 4,10 * (barWidth - 4) / barWidth],
   > itemStyle:{
   > normal:{
   > borderColor: '#7153d3',
   > borderWidth: 2,
   > color:'#352a6b'
   > }
   > },
   > }]
   > };
   > 
   > ### What is expected?
   > 为0值时,正常显示
   > When it is 0, it will display normally
   > 
   > ### What is actually happening?
   > 位置显示错乱
   > Disordered position display
   
   if data = [182, 0, 191, 234, 290, 330, 310], it will be correct,but if data = [0, 182, 191, 234, 290, 330, 310],is wrong


----------------------------------------------------------------
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] [incubator-echarts] jkwf commented on issue #12789: 使用pictorialBar,symbolOffset: [0, '-50%'], 当data中第一个值为0的时候,位置出现偏差,显示在左上角

Posted by GitBox <gi...@apache.org>.
jkwf commented on issue #12789:
URL: https://github.com/apache/incubator-echarts/issues/12789#issuecomment-641879923


   <img width="795" alt="截屏2020-06-10 17 32 38" src="https://user-images.githubusercontent.com/17527532/84251862-82dd0180-ab40-11ea-80bc-976b98f9654b.png">
   


----------------------------------------------------------------
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] [incubator-echarts] plainheart commented on issue #12789: 使用pictorialBar,symbolOffset: [0, '-50%'], 当data中第一个值为0的时候,位置出现偏差,显示在左上角

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #12789:
URL: https://github.com/apache/incubator-echarts/issues/12789#issuecomment-643103617


   Yes. Thank you for reporting! This bug is under discussion in #12793.


----------------------------------------------------------------
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] [incubator-echarts] jkwf commented on issue #12789: 使用pictorialBar,symbolOffset: [0, '-50%'], 当data中第一个值为0的时候,位置出现偏差,显示在左上角

Posted by GitBox <gi...@apache.org>.
jkwf commented on issue #12789:
URL: https://github.com/apache/incubator-echarts/issues/12789#issuecomment-646548035


   > Yes. Thank you for reporting! This bug is under discussion in #12793.
   
   什么时候能有结果呢?
   When will there be results?


----------------------------------------------------------------
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] [incubator-echarts] echarts-bot[bot] commented on issue #12789: 使用pictorialBar,symbolOffset: [0, '-50%'], 当data中第一个值为0的时候,位置出现偏差,显示在左上角

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


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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