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 as "rendered" but is not visible #29

Open
evanrooijen opened this issue Jun 10, 2015 · 19 comments
Open

Chart as "rendered" but is not visible #29

evanrooijen opened this issue Jun 10, 2015 · 19 comments

Comments

@evanrooijen
Copy link

I'm following this example but my chartdivs do not show any charts.
Authentication flow works fine btw.

https://ga-dev-tools.appspot.com/polymer-elements/

@philipwalton
Copy link
Member

Does the demo work for you?

@evanrooijen
Copy link
Author

Yes the demo works

@philipwalton
Copy link
Member

Ok, then you're going to need to give me more details. Can you link to an example or post your code?

@roberthallatt
Copy link

I'm having the same issue. The demo works but my charts won't render on my own server. Here is the URL to see my code - http://www.kidsnewtocanada.ca/stats/test4/bower_components/google-analytics/demo.html

@philipwalton
Copy link
Member

I see, yes I can reproduce this as well when installing the dependencies with the following bower command and then creating an HTML file with the demo code:

bower install googlewebcomponents/google-analytics googlewebcomponents/google-signin

I'm assuming it's a discrepancy with the versions used by the demo and those installed by bower.

@atotic can you look into why the demo works but a fresh install doesn't?

@atotic
Copy link
Contributor

atotic commented Jun 12, 2015

Polymer update broke google-chart. Fix has not made it to google-chart release yet. Will be fixed when this goes in: GoogleWebComponents/google-chart#50

@philipwalton
Copy link
Member

Hey @atotic I'm still seeing this issue, now on the live demo:
http://googlewebcomponents.github.io/google-analytics/components/google-analytics/demo/

@atotic
Copy link
Contributor

atotic commented Jul 6, 2015

googlewebcomponents still has an old version of google-chart. The 1.0.2 release was tagged, but not published. I've just published it, next gwc pull should get it.

@ebidel
Copy link
Contributor

ebidel commented Jul 9, 2015

FWIW, gwc.github.io should be considered deprecated now that we're hosting the elements at https://elements.polymer-project.org/elements/google-analytics?view=demo:demo/index.html&active=google-analytics-query.

The latter works.

The @demo link was missing from the docs, which is why it wasn't showing up. It's been added but we still need to update the catalog to reflect.

@emfluenceindia
Copy link

Chart is not showing up for me either! In elements.html I have referenced the following files:

bower_components/google-analytics/google-analytics.html
bower_components/google-analytics/google-analytics-query.html
bower_components/google-analytics/google-analytics-chart.html
bower_components/google-analytics/google-analytics-view-selector.html

and my index.html looks like this:

<google-analytics-chart type="area" ids="ga:88814676" metrics="ga:sessions" dimensions="ga:date"
startDate="2015-10-01" endDate="2015-10-31"></google-analytics-chart>

The demo at https://elements.polymer-project.org/elements/google-analytics?view=demo:demo/index.html&active=google-analytics-query however works.

Am I missing something?

@philipwalton
Copy link
Member

Are you getting any errors in the JavaScript console?

Also, do you have the <google-signin> element anywhere? You have to be authorized to make requests to the Google Analytics APIs.

@emfluenceindia
Copy link

There is no relevant error in console I could see. However, I don't have anywhere. When I installed google-chart component this got installed for Polymer Starter Kit (after I made the choice of !1). How would I use it?

@philipwalton
Copy link
Member

Take a look at the code in the demo file.

Here you can see the <google-signin> element being used:
https://github.com/GoogleWebComponents/google-analytics/blob/master/demo/index.html#L184-L186

And you'll need to make sure to include it as I have here:
https://github.com/GoogleWebComponents/google-analytics/blob/master/demo/index.html#L9

For details on how it works, check out it's docs:
https://elements.polymer-project.org/elements/google-signin

@emfluenceindia
Copy link

Thanks for your reply. But I cannot find a client_id. I have several accounts under my Google Analytics and I want to fetch data from one of these. Is client_id the same for all these accounts or they are different for each?

And also where I should look for this client_id like you have:
client-id="1054047045356-j8pgqgls9vdef3rl09hapoicumbte0bo.apps.googleusercontent.com"

Another thing I have noticed that you did not use any "ids", which (probably) means you are not sticking to a particular account. Am I allowed to include an id and a date range to restrict data from a specific account and filtered by the dates?

<google-analytics-chart type="area" ids="ga:88814676" metrics="ga:sessions" dimensions="ga:date" start-date="2015-10-01" end-date="2015-10-31" max-results="5"></google-analytics-chart>

@MeTaNoV
Copy link

MeTaNoV commented Nov 17, 2015

Open your Google Developer Console, then under API Manager > Credentials, you can create new Client IDs!

@philipwalton
Copy link
Member

@klan
Copy link

klan commented Oct 11, 2016

Has there been any breaking changes?
I can't make the demo at https://elements.polymer-project.org/elements/google-analytics?view=demo:demo/index.html&active=google-analytics-dashboard work. I just get empty view-/date-selectors and charts.

@ravenreaving
Copy link

image

hi i'm using the demo in localhost. i replaced the client id with mine. but this is all i got in the output :(
and console errors saying the polymer is not defined.

@vka1000
Copy link

vka1000 commented Jan 20, 2017

is this component really working based on polymer 1.7 release ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants