My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
UsingWordPress  
Updated May 31, 2012 by markus.g...@googlemail.com

Using googleVis output with WordPress

WordPress is a popular web software for creating websites and blogs. Here we give some tips about the usage with googleVis output.

By default WordPress does not allow JavaScript code (and hence googleVis output) to be inserted into a page. However, additional plugins allow us to extend the functions of WordPress.

One option of embedding JavaScript code inside a WordPress post is to use the "custom fields shortcode" plugin. This plugin allows you to create a custom field for the googleVis code, which can be referred to in your article.

Suppose you created a motion chart in R:

M <- gvisMotionChart(Fruits, "Fruit", "Year",
		     options=list(width=400, height=370))

Copy the chart code, e.g. from

print(M, 'chart')

and paste it into the value text area of a custom field in WordPress, e.g. with instance name Fruits. To include the motion chart into your article add [cf]Fruits[/cf] into the post, see the figure below for an illustration. For more details see also the vignette.

Comment by alfasba...@gmail.com, Oct 26, 2011

why this does not work when I repeated the same thing, I use the web version of WP. Can you help me please?

Comment by project member markus.g...@googlemail.com, Oct 26, 2011

It is very difficult to help you, when you don't provide any details. We can't judge, if your problem is related to googleVis, WordPress? or the plug-in. Please provide more information via email.

Comment by alfasba...@gmail.com, Nov 15, 2011

my problem is at wordpres. I have no problem with blogger. The dificult lies in the creation of a post because I do not know how to use wordpress plugin, or if it's a php function that must be put in my theme afain to support the Google Chart API with R . Thank you for your message.


Sign in to add a comment
Powered by Google Project Hosting