question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not enough columns given to draw the requested chart

See original GitHub issue

react-google-charts 1.5.5 react v15.6.1

##Expected behaviour

Chart rendered without any errors in console.

##Actual behaviour

Chart rendered as expected, however, in console there’s error:

Uncaught Error: Not enough columns given to draw the requested chart.

For chart rendering:

    <Chart
                  chartType="PieChart"
                  data={[['Age', 'Weight'], ['a', 12], ['b', 5.5]]}
                  options={pieOption}
                  graph_id="PieChart"
                  width={'100%'}
                  height={'400px'}
                  legend_toggle
                />

The pieOption:

    const pieOptions = {
      title: '',
      pieHole: 0.6,
      slices: [
        {
          color: '#2BB673',
        },
        {
          color: '#d91e48',
        },
        {
          color: '#007fad',
        },
        {
          color: '#e9a227',
        },
      ],
      legend: {
        position: 'bottom',
        alignment: 'center',
        textStyle: {
          color: '233238',
          fontSize: 14,
        },
      },
      tooltip: {
        showColorCode: true,
      },
      chartArea: {
        left: 0,
        top: 0,
        width: '100%',
        height: '80%',
      },
      fontName: 'Roboto',
    };

What I found is if I removed fontName: 'Roboto', from pieOption, the error will disappear.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
james-tiqkcommented, Jun 29, 2017

When using a font like Arial it works fine. Not sure if this is because Roboto is a web font or something.

0reactions
wheresviccommented, Jul 25, 2018

I upgraded to the latest version and the problem seems to be gone 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

not enough columns to draw -google charts - Stack Overflow
I have tried to pass some array data to google charts but it says not enough columns to draw chart.here is my code....
Read more >
Not enough columns given to draw the requested chart #2099
Pls I need solution to this error message "Not enough columns given to draw the requested chart". The table and the BarChart display...
Read more >
Not enough columns given to draw the requested chart.
Not enough columns given to draw the requested chart. Is a message displayed by Google charts (you can perform a search using your...
Read more >
Not enough columns given to draw the requested chart #145
Successfully merging a pull request may close this issue. fix: 'Not enough columns given to draw the requested chart' thnt/react-google-charts.
Read more >
Customise the message "Not enough columns given to draw ...
Not enough columns given to draw the requested chart. So we want to place a customized error message here in case module does...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found