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/07/05 10:25:16 UTC

[GitHub] [echarts] livb9 opened a new issue #15295: Bar drawing problem

livb9 opened a new issue #15295:
URL: https://github.com/apache/echarts/issues/15295


   ### Version
   5.1.2
   
   ### Steps to reproduce
   Use the following code:
   
   option = {
       title: {
           text: 'rain',
           left: 'center',
           align: 'right'
       },
       tooltip: {
           trigger: 'axis',
       },
       dataZoom: [
           {
               type: 'inside',
               realtime: true,
               start: 65,
               end: 85
           }
       ],
       xAxis: [
           {
               type: 'category',
               boundaryGap: true,
               axisLine: {onZero: false},
               axisTick: {
                           alignWithLabel: true
                       },
               data: [
                   '2009/6/12 2:00', '2009/6/12 3:00', '2009/6/12 4:00', '2009/6/12 5:00', '2009/6/12 6:00', '2009/6/12 7:00', '2009/6/12 8:00', '2009/6/12 9:00', '2009/6/12 10:00', '2009/6/12 11:00', '2009/6/12 12:00', '2009/6/12 13:00', '2009/6/12 14:00', '2009/6/12 15:00', '2009/6/12 16:00', '2009/6/12 17:00', '2009/6/12 18:00', '2009/6/12 19:00', '2009/6/12 20:00', '2009/6/12 21:00'
               ].map(function (str) {
                   return str.replace(' ', '\n');
               })
           }
       ],
       yAxis: [
           {
               nameLocation: 'start',
               type: 'value',
           }
       ],
       series: [
           {
               name: 'rain',
               type: 'bar',
               barCategoryGap: 0,
               areaStyle: {},
               lineStyle: {
                   width: 1
               },
               data: [
                   1.0,1.2,2.2,3.0,2.9,3.3,1.4,0.8,0.8,0.9,1.0,0.9,0.8,1.4,1.7,1.7,1.7,1.8,1.8,1.2
               ]
           }
       ]
   };
   
   ### What is expected?
   bar should be drawn between two ticks
   
   ### What is actually happening?
   bar is drawn on both sides of a tick
   
   <!-- 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.

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


[GitHub] [echarts] Ovilia commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-877948206


   Do you mean you wish the first bar to be between 14:00 to 15:00 and the second bar to be between 15:00 to 16:00?


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


[GitHub] [echarts] yufeng04 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
yufeng04 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-874406997


   Maybe you can set  [alignWithLabel: false](https://echarts.apache.org/zh/option.html#xAxis.axisTick.alignWithLabel)


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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-876378026


   How to use the bar chart to draw the rainfall described above, if anyone knows, please tell me, thank you in advance.


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #15295: Bar drawing problem

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


   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 it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   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 question.
   
   If you are interested in the project, you may also subscribe our [mailing 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.

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


[GitHub] [echarts] echarts-bot[bot] commented on issue #15295: Bar drawing problem

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


   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 it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   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 question.
   
   If you are interested in the project, you may also subscribe our [mailing 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.

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


[GitHub] [echarts] Ovilia commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-878742688


   Or you may use something like 
   
   ```js
   axisLabel: {
           align: 'left',
           padding: [0, 0, 0, -45]
   }
   ```
   to get
   ![image](https://user-images.githubusercontent.com/779050/125383803-97866b80-e3ca-11eb-9f30-76157aa9c6b6.png)
   
   But with this method, if the width of the bar is not fixed, it may be a little tricky to calculate.


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


[GitHub] [echarts] Ovilia commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-878738239


   https://echarts.apache.org/examples/zh/editor.html?c=custom-profit Please use custom series to make such charts.


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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-879041711


   I tried to modify the axisLabel settings, but it was not the effect I expected. It seems that I have to try custom series. @Ovilia 


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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-877920236


   ![test](https://user-images.githubusercontent.com/86958037/125221056-3a22e980-e2fa-11eb-9e1d-cd43c657cba3.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.

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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-874001872


   This is a screenshot.
   ![screen](https://user-images.githubusercontent.com/86958037/124457837-d90d8a00-ddbe-11eb-9fd0-5f7881c4622a.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.

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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-874001872


   This is a screenshot.
   ![screen](https://user-images.githubusercontent.com/86958037/124457837-d90d8a00-ddbe-11eb-9fd0-5f7881c4622a.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.

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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-874763896


   Change alignWithLabel to false, and the result is the same.[
   ![effect](https://user-images.githubusercontent.com/86958037/124608882-b1dbb900-dea1-11eb-9b6d-7db4db78d656.png)
   ](url)


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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-877953386


   Yes, if paint like this, the bar chart and the data will match.  @Ovilia 


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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-874769684


   This figure shows the rainfall process, as shown in the above figure, for example, the rainfall is 0.8mm from 14:00 to 15:00, and the rainfall is 1.4mm from 15:00 to 16:00. However, the figure shows from 14:00 to 15:00, half of the area is 0.8mm and the other half is 1.4mm. 


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


[GitHub] [echarts] yufeng04 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
yufeng04 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-874406997


   Maybe you can set  [alignWithLabel: false](https://echarts.apache.org/zh/option.html#xAxis.axisTick.alignWithLabel)


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


[GitHub] [echarts] Megrax commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
Megrax commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-877808832


   try this:
   ```
   option = {
       title: {
           text: 'rain',
           left: 'center',
           align: 'right'
       },
       tooltip: {
           trigger: 'axis',
       },
       dataZoom: [
           {
               type: 'inside',
               realtime: true,
               start: 65,
               end: 85
           }
       ],
       xAxis: [
           {
               type: 'category',
               axisLine: {onZero: false},
               data: [
                   '2009/6/12 2:00', '2009/6/12 3:00', '2009/6/12 4:00', '2009/6/12 5:00', '2009/6/12 6:00', '2009/6/12 7:00', '2009/6/12 8:00', '2009/6/12 9:00', '2009/6/12 10:00', '2009/6/12 11:00', '2009/6/12 12:00', '2009/6/12 13:00', '2009/6/12 14:00', '2009/6/12 15:00', '2009/6/12 16:00', '2009/6/12 17:00', '2009/6/12 18:00', '2009/6/12 19:00', '2009/6/12 20:00', '2009/6/12 21:00'
               ].map(function (str) {
                   return str.replace(' ', '\n');
               })
           }
       ],
       yAxis: [
           {
               nameLocation: 'start',
               type: 'value',
           }
       ],
       series: [
           {
               name: 'rain',
               type: 'bar',
               barCategoryGap: 0,
               areaStyle: {},
               lineStyle: {
                   width: 1
               },
               data: [
                   1.0,1.2,2.2,3.0,2.9,3.3,1.4,0.8,0.8,0.9,1.0,0.9,0.8,1.4,1.7,1.7,1.7,1.8,1.8,1.2
               ]
           }
       ]
   };
   ```
   https://codesandbox.io/s/epic-benz-lde5s?file=/src/index.js


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


[GitHub] [echarts] livb9 commented on issue #15295: Bar drawing problem

Posted by GitBox <gi...@apache.org>.
livb9 commented on issue #15295:
URL: https://github.com/apache/echarts/issues/15295#issuecomment-877919346


   Thank you for your help. I tried the above code, but the result is the same. Please take a look at the screenshot above. My expectation is to start drawing from the position of the dotted line. Currently it is drawn from 0 on the x-axis. @Megrax 


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