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 2022/07/13 08:26:29 UTC

[GitHub] [echarts] Depact opened a new issue, #17368: [Feature] Aspect Ratio support

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

   ### What problem does this feature solve?
   
   Example of layout I'm trying of achieve:
   <img src="https://user-images.githubusercontent.com/19435553/178685808-f1925d5b-80c6-4b50-b588-4859c8242169.png" height="400">
   
   What I have now, with default settings:
   <img src="https://user-images.githubusercontent.com/19435553/178684624-89ccce4a-5964-4124-86a6-b9256092f894.png" height="400">
   Next row is invisible due to height of first. So I'm looking way to set aspect ratio, so charts will follow it when page resized, not taking way too much height, and change it for mobile view.
   
   ### What does the proposed API look like?
   
   Chart.js have it: https://www.chartjs.org/docs/latest/configuration/responsive.html
   ```JS
   options: {          
      aspectRatio: 0.5, 
   }
   ```


-- 
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] robertabenassi commented on issue #17368: [Feature] Aspect Ratio support

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

   This point is quite critical for my applications.
   I often need to get the axis scaled.
   Plotly.js has something that let me do that:
   https://plotly.com/javascript/reference/layout/xaxis/#layout-xaxis-scaleanchor
   
   Playing with aspect ratio, as a CSS properties may be useful when you have just one vertical axis, for example,
   but I need to handle  two or more y-axis.
   
   Please, would you mind to consider to introduce the feature?


-- 
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] plainheart commented on issue #17368: [Feature] Aspect Ratio support

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

   Perhaps you can apply the native CSS property [`aspect-ratio`](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio) on the container of the chart.


-- 
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] efj5n8 commented on issue #17368: [Feature] Aspect Ratio support

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

   Aspect ratio would be excellent. I had to go in and mess about with containers and CSS code to get my image scale properly, which was somewhat annoying to do.


-- 
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 #17368: [Feature] Aspect Ratio support

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

   I see two issues at stake here.
   1) [aspect-ratio](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio), as @plainheart said, is about the container of a chart. It works fine.
   2) responsiveness of a grid of ECharts, as @Depact says - _"Next row is invisible due to height of first"_.
   This could be solved with CSS tricks like ```flex-direction: column;```.
   
   [This Demo](https://codepen.io/helgasoft/pen/abPbGOq) shows both working nicely together, despite **not** being related.
   For Mobile view see [this doc](https://echarts.apache.org/en/tutorial.html#Responsive%20Mobile-End).


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