You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "devjyoti3110 (via GitHub)" <gi...@apache.org> on 2023/06/02 13:01:28 UTC

[GitHub] [echarts] devjyoti3110 opened a new issue, #18709: [Feature] Maintaining dynamic bar width based on the series data

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

   ### What problem does this feature solve?
   
   Is it possible to maintain the bar width dynamically based on series data availability?
   
   ### What does the proposed API look like?
   
   NA


-- 
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.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] helgasoft commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1577263838

   There is no problem if Xaxis data remains the same - [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWszGAG0iAXMmugM4AWwA7oWAE4CuApgDTEa0QDmnjthA5BDCMAtv2IBfVugAeAQRkQShVOnRgAniEYCAxgENhnYLQ39pagCaH9hANr8AsjHOx-AFSav-AdUaXvdzJ6bwAxDm8AZUMo-mh-AF0LKWINBSUVNgwtHTcAN31sL0kLEl4IRmVYOyzVNXRrMFtqgEYAJgAGZlhOrtgWgFYOpIB6EdgADj6Adj6WlrmAZmGLes1tAQAjfVpzLIliBJQJAG4gA).
   ![image](https://github.com/apache/echarts/assets/13038071/0d0d9081-ea82-4f3f-8776-994f128d8d59)
   


-- 
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] devjyoti3110 closed issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "devjyoti3110 (via GitHub)" <gi...@apache.org>.
devjyoti3110 closed issue #18709: [Feature] Maintaining dynamic bar width based on the series data
URL: https://github.com/apache/echarts/issues/18709


-- 
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] helgasoft commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1578008091

   > But the width of bar is increasing that need to keep same.
   
   use [barWidth](https://echarts.apache.org/en/option.html#series-bar.barWidth) - [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqA2gF1YAel09ZcgBYKVAMQ4QVAZWa2F0bX3QBfF7HI58RVKTKUNLIAbowANkq0JO4keFRWVISwovzE_oLCYgCMAEwADIb5BbBZAKx5Wjz6sAAcxQDsxVlZTQDMFR7-FNR0AEaMHDL9HKoQAmDGRK2tqa4kWiiuANxAA)


-- 
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] iammadanlal commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "iammadanlal (via GitHub)" <gi...@apache.org>.
iammadanlal commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1592586251

   > There is no problem if Xaxis data remains the same - [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWszGAG0iAXMmugM4AWwA7oWAE4CuApgDTEa0QDmnjthA5BDCMAtv2IBfVugAeAQRkQShVOnRgAniEYCAxgENhnYLQ39pagCaH9hANr8AsjHOx-AFSav-AdUaXvdzJ6bwAxDm8AZUMo-mh-AF0LKWINBSUVNgwtHTcAN31sL0kLEl4IRmVYOyzVNXRrMFtqgEYAJgAGZlhOrtgWgFYOpIB6EdgADj6Adj6WlrmAZmGLes1tAQAjfVpzLIliBJQJAG4gA). ![image](https://user-images.githubusercontent.com/13038071/243439721-0d0d9081-ea82-4f3f-8776-994f128d8d59.png)
   
   is it possible to get this without setting extra labels in xAxis? I have added barWidth to reduce with of bar but i don't want big space between bars. it should be all aligned to left.


-- 
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] helgasoft commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1574399204

   An example of "_series data availability_" ?


-- 
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] devjyoti3110 commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "devjyoti3110 (via GitHub)" <gi...@apache.org>.
devjyoti3110 commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1576297441

   > Any example of "_series data availability_" ?
   
   Example 1 - 
   series: [
       {
         name: 'Max',
         type: 'bar',
         data: [40,10,15,67,50,34,23,28]
       }
     ]
   
   Series array has 8 number of data. So, the bar count increase, gap between two bars adjusted as per this, bar width also maintained automatically.
   
   ![image](https://github.com/apache/echarts/assets/52210784/0da6566a-f745-4cca-876a-e168aab058c8)
   
   Now if I remove some of the data from the series data array. As example below,
   Example 2 -
   series: [
       {
         name: 'Max',
         type: 'bar',
         data: [40,10,15]
       }
     ]
   
   ![image](https://github.com/apache/echarts/assets/52210784/a874078c-2c2e-463e-a9af-19540f190fed)
   
   
   Bar width increased. gap between bar also maintained proportionally. I want to keep the bar width maintained same in all the cases where ever data increase/decrease inside the series array. and the gap between bars can maintain a such way so that bars can be spread throughout the chart body all the time. Not only the left/right/center aligned. 
   
   


-- 
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] devjyoti3110 commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "devjyoti3110 (via GitHub)" <gi...@apache.org>.
devjyoti3110 commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1578150343

   > > But the width of bar is increasing that need to keep same.
   > 
   > use [barWidth](https://echarts.apache.org/en/option.html#series-bar.barWidth) - [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqA2gF1YAel09ZcgBYKVAMQ4QVAZWa2F0bX3QBfF7HI58RVKTKUNLIAbowANkq0JO4keFRWVISwovzE_oLCYgCMAEwADIb5BbBZAKx5Wjz6sAAcxQDsxVlZTQDMFR7-FNR0AEaMHDL9HKoQAmDGRK2tqa4kWiiuANxAA)
   
   Yes, to keep bar width same we can use barwidth property. But it will aligned in left. So, I was seeking any way out to spread the bars in total chart area and increase gap in between each bar.
   
   ![image](https://github.com/apache/echarts/assets/52210784/1a99d45d-5b47-49b3-a194-ebc03b5b46e9)
   


-- 
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] devjyoti3110 commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "devjyoti3110 (via GitHub)" <gi...@apache.org>.
devjyoti3110 commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1577999559

   > There is no problem if Xaxis data remains the same - [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWszGAG0iAXMmugM4AWwA7oWAE4CuApgDTEa0QDmnjthA5BDCMAtv2IBfVugAeAQRkQShVOnRgAniEYCAxgENhnYLQ39pagCaH9hANr8AsjHOx-AFSav-AdUaXvdzJ6bwAxDm8AZUMo-mh-AF0LKWINBSUVNgwtHTcAN31sL0kLEl4IRmVYOyzVNXRrMFtqgEYAJgAGZlhOrtgWgFYOpIB6EdgADj6Adj6WlrmAZmGLes1tAQAjfVpzLIliBJQJAG4gA). ![image](https://user-images.githubusercontent.com/13038071/243439721-0d0d9081-ea82-4f3f-8776-994f128d8d59.png)
   
   Yes, We can do that like all bar is shifted to the left. The right side there is a blank spaces. So, I wanted to spread the bars through out the chart area. The spaces in between bars will increase/decrease. Example demo screenshot below,
   
   ![bar-chart-example](https://github.com/apache/echarts/assets/52210784/42418ec9-b8d1-447a-98e7-98f12cdc8186)
    


-- 
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] helgasoft commented on issue #18709: [Feature] Maintaining dynamic bar width based on the series data

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1579062191

   How about some sample code, so I can stop guessing ?


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


Re: [I] [Feature] Maintaining dynamic bar width based on the series data [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18709:
URL: https://github.com/apache/echarts/issues/18709#issuecomment-1751816536

   It is possible to control both _barWidth_ and _xAxis_ depending on series data.
   But usually just updating the axis is enough, leaving _barWidth_ to auto-resize. 
   **[Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=CYQwLiCMAEC80G0EHICyB7AdsgNJATAAwC6OiyAKgK4CmuRJZKA6jcLpIY-RQBZW5uKAGIAnAJaDixAFCgI-OIhQZseLqR60OATiHJW7PAFZ9fATgAc-sZJwB2ErID0zgEYhRAd3gAWQgDc0B6ihErGQTJgAOYANkoAZiCxAM40ATIJVJgAxmDiWNBg6NEAFACU0ADeMtDQ6AAO-VgAdGkSNCkIJC3yIPAx8QD80H0wAFyj4CD4GXWuOZhgYfCNzZhtNB1dPX0tCeKxYFulAB5wAHzQpwiQxLCwhOUtsTSY0WC8kfPOawUb7XEnW6xBaIWY4mAnyUIS80AA1MFPF4AFSLZZza7iAC2IHOqya_022xBvWm-3EmGAABkQCkwABJKk0U5nS7XW7EC5PTF_VqnACCp3EKRauNOBPWxKBO1BfQQwvFxBBQRyWBS6FeLxKpXRPNq0GxAE8AMK8TxgTZgADyhKwpT5mHKmMGSgAhIMMgBfGSOpQ1Or5MCvSZVY6nMCTZA5WLiHIAayK6CT0TidC9OANguFKVDRSNDRoUZy4Bo0XQoiNyGgGYNRqFIrztbqgM6kwQVXzhajIWrXtkXoyxTKzpkxrNFpa9ujsYTuGgWVy61KDU8IGxKUqAZTFW9zqAA)** with dynamic data.


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