isabellachen opened a new issue, #19686:
URL: https://github.com/apache/echarts/issues/19686

   ### Version
   
   5.4
   
   ### Link to Minimal Reproduction
   
   https://codepen.io/isachenx/pen/PogPpjg
   
   ### Steps to Reproduce
   
   1. I use the Basic Line Chart example and added a markLine. 
   2. Changing `series.markLine.data[0].label.distance[1]`, the vertical 
distance, does not move the label. `distance[0]` the horizontal distance works 
fine and moves the label.
   3. I noticed it's vice versa for vertical markLines as per this codePen: 
https://codepen.io/isachenx/pen/NWmGpwP For vertical markLine, changing 
distance[0], the horizontal label, does not move the label. `distance[1]` the 
vertical distance works fine and moves the label.
   
   For horizontal markLine code:
   ```js
   option = {
     xAxis: {
       type: 'category',
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
         data: [150, 230, 224, 218, 135, 147, 260],
         type: 'line',
               markLine: {
           data: [
                {
               type: 'test',
               name: 'test',
               yAxis: 197,
               label: {
                 distance: [50, 50],
               }
             },
             {
               type: 'average',
               name: 'Avg',
             }
           ]
         }
       }
     ]
   };
   ```
   
   For vertical markLine code:
   ```js
   option = {
     textStyle: {
       fontSize: 14
     },
     xAxis: {
       data: ['A', 'B', 'C', 'D', 'E'],
       boundaryGap: true,
       splitArea: {
         show: true
       }
     },
     yAxis: {
       max: 2
     },
     series: [
       {
         name: 'line',
         type: 'line',
         stack: 'all',
         symbolSize: 6,
         data: [0.3, 1.4, 1.2, 1, 0.6],
         markLine: {
           data: [
             {
               name: 'I should have x-offset',
               xAxis: 1,
               label: {
                 formatter: 'B',
                 position: 'end',
                 align: 'start',
                 distance: [20, 0]
               }
             }
           ],
         }
       }
     ],
     grid: {
       top: 30,
       left: 60,
       right: 60,
       bottom: 40
     }
   };
   ```
   
   ### Current Behavior
   
   Unable to change the vertical distance for markLine label for horizonal 
markLine and unable to change the horizontal position for markLine label for 
vertical markLine.
   
   ### Expected Behavior
   
   Able to position the markLine label at an offset to the default position.
   
   ### Environment
   
   ```markdown
   - OS:NA
   - Browser:Chrome
   - Framework:None
   ```
   
   
   ### Any additional comments?
   
   _No response_


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

To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to