-
Notifications
You must be signed in to change notification settings - Fork 338
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
scriptjs based loader breaks working #46
Comments
Hello, Could you please try again with version 1.0.0 ? |
Slightly different behaviour, the “Table has no column” has “Rendering Chart…” below it now: Even worse, now exchanging the (entire) contents of GoogleChartLoader.js from 0.1.8 does NOT fix the problem. 1.0.0. is seriously broken :-( BTW, did you know a react-google-chart (no ’s’) package exists in the npm repository (easily confused). Sorry not to bring better news (reverting to 0.1.8) Allister
|
You can't just replace the google chart loader code. Please read the code On Wed, May 25, 2016, 9:24 PM suecom notifications@github.com wrote:
|
I can see why swapping the old loader in now doesn’t work; you switched to using bluebird promises - yuk :-) That is, the old loader returns the wrong sort of promise. So, now I can’t get 1.0.0 to work at all (least with the old loader 0.2.2 worked). All I get is: As mentioned, this code works fine with the 0.1.8 release. The is very simplified skeleton: var Chart = require('react-google-charts').Chart; var ColChart = React.createClass({
},
}, <Chart chartType={'ComboChart'} data={this.state.data} options={this.state.options} graph_id={"col_chart_id"} /> ); } }); This is all babelified and put in a single bundle.js file. I guess the usage of your package changed after 0.2.2. Unable to follow the demo - sorry Thanks for any help, Allister
|
Yeah the problem is that you're passing a Google Visualization API DataTable If you check the documentation you'll see that you need to pass an array of arrays for the data prop. Or alternatively you can use the convenience rows and columns props. Please read this to see examples of valid data to pass to the library. Closing this issue. |
I noticed your examples used that data format, but there was no mention of datatables no longer being supported (as they’re native to Googles visualisation!). Why did you stop them? How can you do dashboards, filtering, roles, annotations, etc. without them? It greatly reduces the ease/flexibility of using Googles Charts :-( Allister
|
0.1.8 worked (jQuery based loader), 0.2.2 gives 'Table has no columns' (no user code changes).
The given datatable is identical, but replacing the contents of the GoogleChartLoader.js component with the jQuery version in 0.1.8 operation is restored.
My project is using React 15.1, jQuery 2.2.4, and is delivered as a single .js bundle using browserify, transform, babelify, and bundle. No errors on the browsers console.
The text was updated successfully, but these errors were encountered: