Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart height grows indefinitely when width and height are set to 'auto' #551

Closed
blikblum opened this issue Jan 31, 2021 · 8 comments
Closed

Comments

@blikblum
Copy link

Describe the bug
Setting width and height to 'auto', the chart height grows indefinitely

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://nhn.github.io/tui.chart/latest/tutorial-example06-01-column-chart-basic'
  2. In the live example change chart options from width: 900, height: 400 to width: 'auto', height: 'auto'
  3. Press "Run it" button

Expected behavior
Height should not grows indefinitely

Screenshots

Desktop (please complete the following information):

  • OS: [Windows]
  • Browser [Firefox]
  • Version [85]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Probably infinite loop chart resizes container -> container resizes chart

@jungeun-cho jungeun-cho self-assigned this Feb 1, 2021
@jung-han
Copy link
Member

jung-han commented Feb 2, 2021

I checked the issue. Thanks for the bug reporting! This bug will be fixed and released soon.

jung-han pushed a commit that referenced this issue Feb 16, 2021
* fix: add error use layout when container has not width,  height

* docs: fix typo

* chore: apply review
@jung-han
Copy link
Member

@blikblum
Resolved in 4.1.0! Check this version!

@stale
Copy link

stale bot commented Mar 20, 2021

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label Mar 20, 2021
@blikblum
Copy link
Author

Hi, sorry for the delay.

I just checked, and when setting height and width to 'auto', and the container height and width to 100%, the chart still grows indefinitely

See snippet that i used at 'https://nhn.github.io/tui.chart/latest/tutorial-example06-01-column-chart-basic'

      const el = document.getElementById('chart-area');
      el.style.width = '100%';
      el.style.height = '100%';
      const data = {
        categories: ['Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        series: [
          {
            name: 'Budget',
            data: [5000, 3000, 5000, 7000, 6000, 4000, 1000],
          },
          {
            name: 'Income',
            data: [8000, 4000, 7000, 2000, 6000, 3000, 5000],
          },
          {
            name: 'Expenses',
            data: [4000, 4000, 6000, 3000, 4000, 5000, 7000],
          },
          {
            name: 'Debt',
            data: [3000, 4000, 3000, 1000, 2000, 4000, 3000],
          },
        ],
      };
      const options = {
        chart: { title: 'Monthly Revenue', width: 'auto', height: 'auto' },
      };

      const chart = toastui.Chart.columnChart({ el, data, options });    

@stale stale bot removed the inactive label Mar 21, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label Jun 2, 2021
@blikblum
Copy link
Author

blikblum commented Jun 2, 2021

Even today, this issue is still present

@stale stale bot removed the inactive label Jun 2, 2021
@stale
Copy link

stale bot commented Jul 8, 2021

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label Jul 8, 2021
@stale
Copy link

stale bot commented Jul 16, 2021

This issue will be closed due to inactivity. Thanks for your contribution!

@stale stale bot closed this as completed Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants