Frozen chart without CSS

42 views
Skip to first unread message

Jack Lin

unread,
May 11, 2016, 1:49:08 AM5/11/16
to Google Visualization API
Hi,

The recent v45 broke some of my software - I would like to use frozen version v44. However, to use v44 I had to use the new gstatic loader api instead of the old jsapi loader. This gstatic loader will load CSS files which is not desired (as I am using google closure too, we want to override some CSS style). 

Is it possible to specify nocss similar to the old jsapi with the new gstatic loader?

Thank you very much.

Thanks,
Jack 

Jack Lin

unread,
May 11, 2016, 3:36:31 AM5/11/16
to Google Visualization API

Correction: I would like to fallback to v42, not v44. 

Daniel LaLiberte

unread,
May 11, 2016, 6:51:45 AM5/11/16
to Google Visualization API
Jack,

It is not possible to not load the css with the gstatic loader, and I didn't know that was an option with the jsapi loader - we'll have to rectify that.

In the meantime, you should be able to override the css with more specific css specifiers.  For example, add a class for your chart container, and include that class before every rule that you want to override.  Have you tried this?

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/631dafe4-8541-4af7-99eb-1494b09e6eb6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Jack Lin

unread,
May 11, 2016, 9:01:02 AM5/11/16
to Google Visualization API
Hi,

The nocss flag I was referring to can be found on https://developers.google.com/loader/#introduction-to-loading-google-apis. After reviewing the page again, looks like it is not supported for visualization package. I apologize for misleading comment.

Secondly, not sure if I get what you mean. But my goal is not overriding the CSS related to geochart. The problem is that I am using Google Closure to build my UI and it includes some goog CSS. I override it using my own CSS file to change its look. But with gstaic loader it loads back Util.css and overrides my override so it goes back to default looks thus I was wondering if I can simply not load Util.css from gstatic loader.

I now think this is probably nothing to do with visualization package and is more related to gstatic loader...

Thanks,
Jack 

Daniel LaLiberte

unread,
May 11, 2016, 10:12:38 AM5/11/16
to Google Visualization API
The gstatic loader is our own creation, used only with Google Charts, so we can change things if need be.

I understand what you mean about the css loaded by Google Charts overriding your previous override of the Google Closure css.  However, I hope that what I am suggesting still applies.  You'll have to make your overrides be more specific to your context than what Google Charts specifies in its css.  The more specific rules should win.  Something like this:

  <body class="mypage">
    <div id="chart"></div>
    <div id="some_google_closure_thing">...</div>
  </body>

Then your css rules can be like this:

  .mypage .goog-closure-thing {
    /* my styles should override */
  }



--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

Jack Lin

unread,
May 11, 2016, 11:15:19 PM5/11/16
to Google Visualization API
Hi again,

Thank you for pointing out the solution - I understand that would work, it however adds a lot of css rule changes (I basically have the entire google closure css changed in my own css).

Thank you very much!

Thanks,
Jack
Reply all
Reply to author
Forward
0 new messages