IndProgo edited a comment on issue #15956:
URL: https://github.com/apache/echarts/issues/15956#issuecomment-971625603


   Quick and dirty edit in echarts\lib\component\dataZoom\SliderZoomView.js 
file, appended to setLabel function after setStyle
   ```js
   if (orient === HORIZONTAL) {
     var width = handleLabels[handleIndex].getBoundingRect().width;
     var reminder = orderedHandleEnds[1] - orderedHandleEnds[0] - offset;
     if (reminder >= width) {
       var canvasWidth = this.api.getWidth();
       var parentX = handleLabels[handleIndex].parent.x;
       var start = parentX + orderedHandleEnds[0] - offset;
       var end = canvasWidth - (parentX + orderedHandleEnds[1]) - offset;
       if ((!handleIndex && start < width) || (handleIndex && end < width)) {
         var x = graphic.applyTransform([orderedHandleEnds[handleIndex] + 
(handleIndex !== 0 ? -offset : offset), this._size[1] / 2], barTransform)[0];
         var align = graphic.transformDirection(handleIndex !== 0 ? 'right' : 
'left', barTransform);
         handleLabels[handleIndex].setStyle({
           x: x,
           align: align,
         });
       }
     }
   }
   ```


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

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