You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "echarts-bot[bot] (via GitHub)" <gi...@apache.org> on 2023/02/10 08:41:20 UTC

[GitHub] [echarts] echarts-bot[bot] commented on issue #18257: [Bug] Custom series api.barLayout().offsetCenter 没有对齐bar中心

echarts-bot[bot] commented on issue #18257:
URL: https://github.com/apache/echarts/issues/18257#issuecomment-1425423238

   @han-ysys It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] Custom series api.barLayout().offsetCenter does not align bar center
   
   **BODY**
   
   ### Version
   
   5.3.2
   
   ### Link to Minimal Reproduction
   
   https://jsfiddle.net/6ta3qk4d/9/
   
   ### Steps to Reproduce
   
   Refer to [this example](https://echarts.apache.org/examples/zh/editor.html?c=custom-bar-trend) to draw a bar chart with an error bar
   
   ### Current Behavior
   
   Depending on the number of bars on the same coordinate, offsetCenter will have different degrees of offset
   <img width="360" alt="screenshot2023-02-10 16 36 26" src="https://user-images.githubusercontent.com/70315648/218043154-725ace75-18b9-416c-afe8-cdd66357ea97.png">
   The graph in the example also has an offset
   <img width="326" alt="screenshot2023-02-10 16 36 51" src="https://user-images.githubusercontent.com/70315648/218043257-e12d8306-a29e-4713-9a8b-78eb729d0674.png"> 
   ### Expected Behavior
   
   The return value of barLayout in the documentation is described:
   ```
   @return {Array.<Object>} [{
           width: The width of the number bar.
           offset: The offset of number bar, datum to the far left of bar.
           offsetCenter: The offset of the number bar, based on the center of the bar.
       }, ...]
   ```
   The above results should not be as expected
   
   ### Environment
   
   ```markdown
   OS: macOS Monterey
   Browser: Chrome 96.0.4664.55
   Framework Vue@3
   ```
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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-unsubscribe@echarts.apache.org

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