YUI pie chart example

If case you haven't noticed - YUI Charts hit the streets.

As with everything new, it's best shown and understood by example. So here's the simplest example of using a pie chart. Basically I took the example from the YUI page, changed all the paths to point to yahooapis.com (where YUI is hosted for free) and stripped everything that could be stripped (there's even no html or head tags, but turned out the body tag is required). The result is a short html with all dependencies satisfied.

OK, so here's the example, grab, paste, customize:
chart.html


Post this entry to: » del.icio.us  » Digg  » Furl  » Newsvine  » reddit  » Y!

Somewhat related posts

2 Responses to “YUI pie chart example”

  1. Hemant Says:

    Hi,
    Your example was a 2 minute tutorial to have develop your YUI chart. Thanks for that. I have been trying a thing with this chart since long, can I change the color of the different bars that come in YAHOO.widget.ColumnChart just like in PieChart it comes on in its own, and can I govern these various colors? ( Can i decide the various colors in PieChart)… do you have any idea on that?

    Thanks a lot in anticipation.

    Regards,
    Hemant

  2. Stoyan Says:

    Hi Hemant,

    I haven't played with the colors, but seems possible.
    Example: http://developer.yahoo.com/yui/examples/charts/charts-skins.html
    APIs: http://developer.yahoo.com/yui/docs/YAHOO.widget.Chart.html#method_setSeriesStyles

Leave a Reply