Title: Protovis Loader
Author: seancarmody
Published: <strong>2010-يىلى 10-سېنتەبىر</strong>
Last modified: 2010-يىلى 20-سېنتەبىر

---

قىستۇرما ئىزدە

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/protovis-loader.svg)

# Protovis Loader

 يازغۇچى [seancarmody](https://profiles.wordpress.org/seancarmody/)

[چۈشۈر](https://downloads.wordpress.org/plugin/protovis-loader.0.3.0.zip)

 * [تەپسىلاتلار](https://ug.wordpress.org/plugins/protovis-loader/#description)
 * [باھالاشلار](https://ug.wordpress.org/plugins/protovis-loader/#reviews)
 *  [ئورنىتىش](https://ug.wordpress.org/plugins/protovis-loader/#installation)
 * [ئىجادىيەت](https://ug.wordpress.org/plugins/protovis-loader/#developers)

 [قوللاش](https://wordpress.org/support/plugin/protovis-loader/)

## چۈشەندۈرۈش

Protovis Loader is a plugin which faciliates the use of [Protovis](http://vis.stanford.edu/protovis/)
scripts. Protovis is a javascript data visualisation library being developed at 
Stanford, which allows the creation of interactive charts on web pages.

Incorporating Javascript code into WordPress posts can be tricky as it (deliberately)
sanitises text typed into posts, which interferes with Javascript. When I first 
began experimenting with Javascript, this cause me some difficulties, as described
in this post. In the end, I decided to roll up my sleeves and write a plugin to 
make the whole process a lot easier. Protovis Loader was the result.

Protovis Loader makes the whole process a lot easier in two ways:

 1. It ships with a copy of the Protovis javascript library and once the plugin is 
    activated, links to the library will automatically be included in page headers.
 2. It creates a shortcode called [pvis] which makes it very easy to include Protovis
    scripts in blog posts and pages.

Usage:

Simply use the [pvis] shortcode in your posts and pages where you want to include
a Protovis chart. There are a number of optional parameters:

 * type: ›chart‹ (default) displays a chart in a box with an optional caption, ›
   inline‹ has no box (e.g. useful for sparklines)
 * src: path to a Protovis (javascript) code file
 * height: height of canvas box for the chart
 * width: width of canvas box for the chart
 * img: path to a fallback image to use when scripts are blocked or the browser 
   does not support Protovis
 * alt: alt text for the fallback image
 * caption: image caption

If any content is supplied between the opening [pvis] tag and the closing [/pvis]
tag, it is taken to be javascript for inclusion. It may also be interpreted as a
caption, but _only_ if a caption field is not supplied and a src field is supplied.

Here is an example of use of the tag:

[pvis src=»http://www.example.com/chart.js» img=»fails.png» height=»125px»]My Caption![/
pvis]

You can see the plugin in action on [the Stubborn Mule](http://www.stubbornmule.net/resources/protovis-loader/).

### To-Do List

This list is not really prioritised yet.

 1. Improve user-agent (browser) detection
 2. Create an options page
 3. Allow custom CSS files
 4. Allow for alterntive specification of the protovis js library
 5. Replace tags in the imported script to allow shortcode parameters to be used in
    the script

I’m sure there’ll be a lot more!

## ئېكران كەسمىسى

[⌊Using the shortcode in a blog post⌉⌊Using the shortcode in a blog post⌉[

Using the shortcode in [a blog post](http://www.stubbornmule.net/2010/09/protovis-for-chrome-and-safari/)

[⌊The end result.⌉⌊The end result.⌉[

The end result.

## ئورنىتىش

 1. Upload ›pv-loader‹ to the ›/wp-content/plugins/‹ directory
 2. Activate the plugin through the ›Plugins‹ menu in WordPress
 3. Use the [pvis] shortcode to add protovis code to your post (see [Screenshots](https://wordpress.org/extend/plugins/protovis-loader/screenshots/)
    for an example)

## FAQ

  What is the syntax of the pvis shortcode?

Here is an example:

    ```
    [pvis src="/scripts/chart.js" img="/images/fail.png"]A caption[/pvis]
    ```

Attributes:

 * src: specifies the location of the protovis script
 * img: specifes the URL of an image to display instead if scripts are blocked
 * alt: speficies image alternative text

Text between the tags will be set as a caption

  Can I specifiy any CSS?

Not yet.

  Which Protovis library does the plugin use?

Currently version Protovis 3.2 ships with the plugin.

  Can I use a different version of Protovis?

Not yet.

## باھالاشلار

بۇ قىستۇرمىغا تېخى باھا يېزىلمىدى.

## تۆھپىكار ۋە ئىجادكار

«Protovis Loader» كودى ئوچۇق يۇمشاق دېتال. تۆۋەندىكى كىشىلەر بۇ قىستۇرمىغا تۆھپە
قوشقان.

تۆھپىكار

 *   [ seancarmody ](https://profiles.wordpress.org/seancarmody/)

[«Protovis Loader» نى تىلىڭىزغا تەرجىمە قىلىڭ](https://translate.wordpress.org/projects/wp-plugins/protovis-loader)

### ئىجادىيەتكە قىزىقامسىز؟

[كودقا كۆز يۈگۈرتۈپ](https://plugins.trac.wordpress.org/browser/protovis-loader/)،
[SVN خەزىنە](https://plugins.svn.wordpress.org/protovis-loader/) تەكشۈرۈپ ياكى [RSS](https://plugins.trac.wordpress.org/log/protovis-loader/?limit=100&mode=stop_on_copy&format=rss)
ئارقىلىق [ئىجادىيەت خاتىرىسى](https://plugins.trac.wordpress.org/log/protovis-loader/)
گە مۇشتەرى بولغىلى بولىدۇ.

## ئۆزگىرىش خاتىرىسى

#### 0.3.0

 * Tweaked CSS for caption to improve vertical alignment
 * Added optional height/width dimension parameters for chart canvas
 * Added optional «inline» chart type (no caption no borders)

#### 0.2.1

 * Fixed error: missing > in css div element

#### 0.2.0

 * Added CSS (fixed style at this point)
 * Added BlackBerry to the list of non-SVG browsers

#### 0.1.1

A variety of very minor tweaks, mainly adhereing to WP coding standards.

#### 0.1

 * The first release of the plugin.

## Meta

 *  Version **0.3.0**
 *  ئاخىرقى يېڭىلانغان ۋاقىت **16 يىل بۇرۇن**
 *  ئاكتىپ ئورنىتىش سانى **10 دىن ئاز**
 *  WordPress نەشرى ** 2.8.0 ياكى يۇقىرى **
 *  **3.0.5** دا سىنالغان
 *  تىل
 * [English (US)](https://wordpress.org/plugins/protovis-loader/)
 * بەلگە
 * [charts](https://ug.wordpress.org/plugins/tags/charts/)[data visualization](https://ug.wordpress.org/plugins/tags/data-visualization/)
   [graphics](https://ug.wordpress.org/plugins/tags/graphics/)[images](https://ug.wordpress.org/plugins/tags/images/)
   [javascript](https://ug.wordpress.org/plugins/tags/javascript/)
 *  [ئالىي كۆرۈنۈش](https://ug.wordpress.org/plugins/protovis-loader/advanced/)

## دەرىجە

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/protovis-loader/reviews/#new-post)

[بارلىق ئىنكاسنى كۆرسەت](https://wordpress.org/support/plugin/protovis-loader/reviews/)

## تۆھپىكار

 *   [ seancarmody ](https://profiles.wordpress.org/seancarmody/)

## قوللاش

چۈشەندۈرۈشىڭىز بارمۇ؟ ياردەم لازىممۇ؟

 [قوللاش مۇنبىرىنى كۆرسەت](https://wordpress.org/support/plugin/protovis-loader/)