Auto Width no Longer Works in React
See original GitHub issueDescribe the bug
Auto width no longer works in React… getting error To use auto layout, the width or height of the container must be specified as a value such as "%" or "vh", "vw" even though width is specified.
To Reproduce Steps to reproduce the behavior:
const chartOptions = {
chart: {
height: 500,
width: 'auto',
title: 'Monthly Revenue',
format: '1,000'
},
...
}
...
<ColumnChart
style={{ width: "100%" }}
ref={chartRef}
data={chartData}
options={chartOptions}
/>
Expected behavior Expected to work as in documentation… should get a responsive chart.
Desktop (please complete the following information):
- OS: all
- Browser: all
- Version: 4.1.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
React-native view auto width by text inside - Stack Overflow
By doing this everything inside is no longer using the flexbox layout but using text layout. <Text> <Text>{'Your text here'}</Text> </Text>.
Read more >Auto width / set width to longest option width #4201 - GitHub
When using a standard html select element the width of the element get's automatically set to the width of the longest/biggest option. This...
Read more >Height and Width - React Native
The general way to set the dimensions of a component is by adding a fixed width and height to style. All dimensions in...
Read more >scrollbar-width - CSS: Cascading Style Sheets - MDN Web Docs
The scrollbar-width property allows the author to set the maximum thickness of an element's scrollbars when they are shown.
Read more >Column Sizing - React Data Grid
Autosizing columns looks at the rendered cells on the screen, and works out the width based on what it sees. It cannot see...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@tnoetzel I will release it today. When released, I will let you know by comment.
Hi Experts, I am using the @version 4.2.1 and is still able to reproduce the same issue in heatmap chart
const options = { chart: { title: ‘24-hr Average Temperature’, width: ‘auto’, height: ‘auto’ }, xAxis: { title: ‘Month’, }, yAxis: { title: ‘City’, }, tooltip: { formatter: (value) =>
${value}°C, }, legend: { align: ‘bottom’, }, series: { dataLabels: { visible: true, }, }, exportMenu: { visible: false }, responsive: { animation: { duration: 300 } }Error :
toastui-chart.min.js:7 Uncaught Error: To use auto layout, the width or height of the container must be specified as a value such as “%” or “vh”, “vw”. at f.value (toastui-chart.min.js:7) at new e (toastui-chart.min.js:7) at f.<anonymous> (toastui-chart.min.js:7) at new f (toastui-chart.min.js:7) at Function.heatmapChart (toastui-chart.min.js:7)