<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Wijmo &#187; jQueryUI</title> <atom:link href="http://wijmo.com/tag/jqueryui/feed/" rel="self" type="application/rss+xml" /><link>http://wijmo.com</link> <description>UI for the Web</description> <lastBuildDate>Fri, 24 May 2013 00:01:58 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Juice UI &#8211; Microsoft embraces jQuery UI</title><link>http://wijmo.com/juice-ui-microsoft-embraces-jquery-ui/</link> <comments>http://wijmo.com/juice-ui-microsoft-embraces-jquery-ui/#comments</comments> <pubDate>Tue, 28 Feb 2012 17:39:54 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[ASP.NET MVC]]></category> <category><![CDATA[asp.net]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[juice]]></category> <category><![CDATA[Wijmo]]></category><guid isPermaLink="false">http://wijmo.com/?p=3857</guid> <description><![CDATA[I couldn’t be more excited to announce our involvement in Juice UI. Juice UI is appendTo’s modern equivalent to the Ajax Control Toolkit. Just like we realized with Wijmo, appendTo decided that jQuery UI was a great foundation to build on in JavaScript. They have fully adopted jQuery UI by making ASP.NET Controls and Extenders for the [...]]]></description> <content:encoded><![CDATA[<p><img class="size-full wp-image-3859 alignnone" title="Juice UI" src="http://wijmo.com/wp-content/uploads/2012/02/wijmo_juice1.png" alt="Juice UI" width="497" height="161" /><br /> I couldn’t be more excited to announce our involvement in <a href="http://juiceui.com/">Juice UI</a>. Juice UI is appendTo’s modern equivalent to the Ajax Control Toolkit. Just like we realized with Wijmo, appendTo decided that jQuery UI was a great foundation to build on in JavaScript. They have fully adopted jQuery UI by making ASP.NET Controls and Extenders for the widgets shipped with jQuery UI. Juice UI is developed by our friends at <a href="http://appendto.com/">appendTo</a>. They have done a great job at making an ASP.NET version of jQuery UI. Now jQuery UI is more accessible to .NET developers that are not yet familiar with JavaScript.</p><p>Read more about <a href=" http://our.componentone.com/2012/02/28/goodbye-ajax-control-toolkit-hello-juice-ui/">our involvement in Juice UI</a>.</p><p>And keep an eye out for something we have coming soon&#8230;</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/juice-ui-microsoft-embraces-jquery-ui/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Wijmo Wednesday: Server Side Grid Magic</title><link>http://wijmo.com/wijmo-wednesday-server-side-grid-magic/</link> <comments>http://wijmo.com/wijmo-wednesday-server-side-grid-magic/#comments</comments> <pubDate>Wed, 15 Feb 2012 16:00:00 +0000</pubDate> <dc:creator>Kevin Griffin</dc:creator> <category><![CDATA[Wijmo Wednesday]]></category> <category><![CDATA[grid]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[server-side]]></category> <category><![CDATA[Wijmo]]></category><guid isPermaLink="false">http://wijmo.com/?p=3716</guid> <description><![CDATA[In a previous post, we discussed how to add a whole bunch of awesome features to a standard HTML table and transform it into a “grid”.&#160; What I’d like to do today is show you how to move a lot of this functionality over to the server. By harnessing the server to do a lot [...]]]></description> <content:encoded><![CDATA[<p><a href="http://wijmo.com/more-grid-magic-with-wijmo/" target="_blank">In a previous post</a>, we discussed how to add a whole bunch of awesome features to a standard HTML table and transform it into a “grid”.&nbsp; What I’d like to do today is show you how to move a lot of this functionality over to the server.</p><p>By harnessing the server to do a lot of the “heavy lifting”, we can give our users a smooth experience.&nbsp; What heavy lifting would need to be done?&nbsp; Assume you have a data set of 1 million rows.&nbsp; That’s a lot of data to send to the client, and then sort/page/filter.&nbsp; If we ask the server to sort/page/filter the data before sending it to the client, we can quickly reduce the overhead of the client.</p><p>I’m going to be using the example from my webcast, which you can access <a href="http://vimeo.com/36103120" target="_blank">here</a>.</p><h1>The Server</h1><p>For data, I’m using the Chinook database.&nbsp; It’s quick and easy to set up, and gives me good data to use in my examples.&nbsp; I’m using ASP.NET MVC 3 for my examples, and we’ll only be implementing sorting and filtering.</p><pre>        public JsonResult GetAlbumList()
        {
            int pageSize = Request.Params["paging[pageSize]"] != null ? Convert.ToInt32(Request.Params["paging[pageSize]"]) : 0;
            int pageIndex = Request.Params["paging[pageIndex]"] != null ? Convert.ToInt32(Request.Params["paging[pageIndex]"]) : 0;

            string sortColumn = Request.Params["sorting[0][dataKey]"];
            string sortDirection = Request.Params["sorting[0][sortDirection]"];

            if (string.IsNullOrEmpty(sortColumn)) sortColumn = String.Empty;
            if (string.IsNullOrEmpty(sortDirection)) sortDirection = String.Empty;

            using (var entity = new ChinookEntities())
            {
                var allAlbums = from al in entity.Albums
                                join ar in entity.Artists on al.ArtistId equals ar.ArtistId
                                select new AlbumResult()
                                           {
                                               AlbumName = al.Title,
                                               ArtistName = ar.Name
                                           };

                var totalRowCount = allAlbums.Count();

                if (pageSize == 0)
                    pageSize = totalRowCount;

                if (sortColumn.ToLower() != "album")
                    allAlbums = sortDirection.ToLower() == "descending"
                                    ? allAlbums.OrderByDescending(p =&gt; p.ArtistName).Skip(pageSize*pageIndex).Take(pageSize)
                                    : allAlbums.OrderBy(p =&gt; p.ArtistName).Skip(pageSize*pageIndex).Take(pageSize);
                else
                    allAlbums = sortDirection.ToLower() == "descending"
                                    ? allAlbums.OrderByDescending(p =&gt; p.AlbumName).Skip(pageSize*pageIndex).Take(pageSize)
                                    : allAlbums.OrderBy(p =&gt; p.AlbumName).Skip(pageSize*pageIndex).Take(pageSize);

                var result = new WijmoGridResult { Items = allAlbums.ToList(), TotalRowCount = totalRowCount };

                return Json(result, JsonRequestBehavior.AllowGet);
            }
        }
</pre><p>Let&#8217;s walkthrough what this code does, because it does a lot.&nbsp; The first six lines pulls out Request parameters that Wijmo will send.&nbsp; Because it is possible for these values to be null, a little bit of self checking needs to take place.</p><p>Starting at the using statement, we’re opening a connection to our database with Entity Framework.&nbsp; We use the idea of lazy loading to create a structured query so our round trip to SQL Server only happens once.&nbsp; The first query creates a query for all the albums in the database.&nbsp; This is needed to get the total row count.&nbsp; Wijmo will use that to determine the paging requirements.</p><p>For sorting, you’ll probably be drawn to the epic IF..ELSE statement.&nbsp; All this is doing is determining what column we want to sort by and how we want to sort it (ascending or descending), and apply the correct LINQ filter.&nbsp; These calls are also using the Skip() and Take() technique for pagination.&nbsp;</p><p>Finally, you might notice I don’t have the definitions for AlbumResult and WijmoGridResult.&nbsp; Here is the code for those classes:</p><pre>    public class AlbumResult
    {
        public string AlbumName { get; set; }
        public string ArtistName { get; set; }
    }

    public class WijmoGridResult
    {
        public List Items { get; set; }
        public int TotalRowCount { get; set; }
    }
</pre><h1>The Client</h1><p>Now that the server is configured, we need to change our Wijmo configuration a little bit to use the new settings.</p><pre>	$(document).ready(function () {

		var dataReader = new wijarrayreader([
				{ name: "Artist", mapping: "ArtistName" },
				{ name: "Album", mapping: "AlbumName" }
			]);

		var dataSource = new wijdatasource({
			proxy: new wijhttpproxy({
				url: "@Url.Action("GetAlbumList")",
				dataType: "json"
			}),
			dynamic: true,
			reader: {
				read: function (datasource) {
					var count = datasource.data.TotalRowCount;
					datasource.data = datasource.data.Items;
					datasource.data.totalRows = count;
					dataReader.read(datasource);
					}
			}
		});

		$("#remoteTable").wijgrid({
			pageSize: 15,
			data: dataSource,
			allowPaging: true,
			allowSorting: true</pre><pre>		});
	});
</pre><p>At the top, we’re going to declare a new datareader for the JSON coming from the server.&nbsp; This tells Wijmo how to map JSON properties to Columns in the grid.&nbsp;</p><p>Next is the datasource.&nbsp; This is a proxy for a URL.&nbsp; Wijmo will do a GET on this URL to pull information.&nbsp; The <strong>dynamic</strong> keyword tells Wijmo that the server will accept sorting, filtering, and paging requests.&nbsp; If this is false or not set, Wijmo will not send the request parameters we mentioned earlier.&nbsp; The reader tells WIjmo how to interpret the data coming in, and decipher row counts and then finally apply the datareader.</p><p>The last call is the actual WijGrid creation.&nbsp; This shouldn’t be too different from what you’ve seen in the past.&nbsp; The only thing that makes Wijmo use the server to gather data is the datasource.&nbsp;</p><p>I hope this serves as an introduction to doing server side calls with Wijmo.&nbsp; If you have any questions at all, feel free to post them to the comments or email me!</p><p>Kevin Griffin<br /><a href="mailto:keving@componentone.com">keving@componentone.com</a></p><p><a href="http://twitter.com/1kevgriff" target="_blank">Follow Me On Twitter</a></p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/wijmo-wednesday-server-side-grid-magic/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Wijmo Wednesday: Measure up with Linear Gauges</title><link>http://wijmo.com/wijmo-wednesday-measure-up-with-linear-gauges/</link> <comments>http://wijmo.com/wijmo-wednesday-measure-up-with-linear-gauges/#comments</comments> <pubDate>Wed, 08 Feb 2012 17:16:58 +0000</pubDate> <dc:creator>Kevin Griffin</dc:creator> <category><![CDATA[Wijmo Wednesday]]></category> <category><![CDATA[gauge]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[linear]]></category> <category><![CDATA[Wijmo]]></category><guid isPermaLink="false">http://wijmo.com/?p=3625</guid> <description><![CDATA[Wijmo v2 is here!&#160; Yay!&#160;&#160; For today’s Wijmo Wednesday, let’s take a look at a new Wijmo v2 feature: Linear Gauges. Getting Started To get started, we need to create a new DIV for the gauge to live in. &#160; &#60;div id="gauge"&#62;&#60;/div&#62; There you go!&#160; Of course, that doesn’t do anything, so let’s write a [...]]]></description> <content:encoded><![CDATA[<p>Wijmo v2 is here!&nbsp; Yay!&nbsp;&nbsp; For today’s Wijmo Wednesday, let’s take a look at a new Wijmo v2 feature: Linear Gauges.</p><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image5.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb5.png" width="336" height="96"></a></p><h2>Getting Started</h2><p>To get started, we need to create a new DIV for the gauge to live in.</p><p>&nbsp;</p><pre>&lt;div id="gauge"&gt;&lt;/div&gt;</pre><p>There you go!&nbsp; Of course, that doesn’t do anything, so let’s write a little bit of JavaScript to turn that DIV into a Linear Gauge.</p><pre>$("#gauge").wijlineargauge();</pre><p>If you render this as is, the gauge will look similar to this picture:</p><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image6.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb6.png" width="334" height="96"></a></p><p>A couple of things to point out on this gauge.&nbsp; First is the tick marks.&nbsp; These are called <strong>Major Ticks</strong>.&nbsp; By default, these are set to automatically show for an interval of 10.&nbsp; There are also <strong>Minor Ticks</strong> that can be shown in between each major tick.&nbsp; By default, these are not displayed.&nbsp; We’ll show you how to change the value in a moment.</p><h2>Changing Minimum and Maximum Values</h2><p>There are two properties for setting minimum and maximum values of the linear gauge.&nbsp; These are called <strong>min </strong>and <strong>max</strong>.&nbsp; Let’s play with the values:</p><pre>$("#gauge").wijlineargauge({ min: 0, max: 1000 });</pre><p>Doing this will product an image like so:</p><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image7.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb7.png" width="331" height="89"></a></p><p>Whoa!&nbsp; What’s wrong!?&nbsp; Well, the tick major is still set to 10, so the gauge is trying to render a tick for every interval from 0 to 1000.&nbsp; Let’s change the ticks to a more reasonable value.</p><h2>Setting Tick Intervals</h2><p>I’m going to play with two new values: <strong>tickMajor </strong>and <strong>tickMinor</strong>.&nbsp;</p><pre>
$("#gauge").wijlineargauge({
            min: 0,
            max: 1000,
            tickMajor: {
                interval: 200
            },
            tickMinor: {
                interval: 50,
                visible: true
            }
        });
</pre><p>Refresh the page.&nbsp; Note the bolded visible: true.&nbsp; This is important since the tickMajor.visible property is defaulted to false.&nbsp; Here’s what the updated picture looks like:</p><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image8.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb8.png" width="331" height="94"></a></p><p>Doesn’t that look much better!&nbsp; Next, let’s play around with that pointer and set the gauge to a value other than zero.</p><h2>Setting Pointer Value</h2><pre>
$("#gauge").wijlineargauge({
            min: 0,
            max: 1000,
            tickMajor: {
                interval: 200
            },
            tickMinor: {
                interval: 50,
                visible: true
            },
            value: 475
        });
</pre><p>The code change is highlighted above.&nbsp; Set the <strong>value </strong>property to update where the pointer goes.&nbsp; Pictures don’t do this justice, because the transition is animated.</p><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image9.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb9.png" width="332" height="93"></a></p><p>If you’d like to update the value dynamically, all you need to do is use jQueryUI property updating syntax:</p><pre>$("#gauge").wijlineargauge("option", "value", 755);
</pre><h2>Ranges</h2><pre>
$("#gauge").wijlineargauge({
            min: 0,
            max: 1000,
            tickMajor: {
                interval: 200
            },
            tickMinor: {
                interval: 50,
                visible: true
            },
            value: 475,
            ranges: [
                {
                    startValue: 800,
                    endValue: 1000,
                    startDistance: 0.95,
                    endDistance: 0.75,
                    startWidth: 0.5,
                    endWidth: 0.5,
                    style: {
                        fill: "90-#3DA1D8-#3A6CAC",
                        opacity: "1",
                        stroke: "none"
                    }
                }
            ]
        });
</pre><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image10.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb10.png" width="333" height="96"></a></p><p>The ranges property is an array. Inside the array is a list of range values that are to be applied to the gauge. In this example, I’m only creating a single range, but you can add more. StartValue and endValue are obvious. This is where the range begins and ends. StartWidth and endWidth determine the width (or depending on the orientation it could considered height).&nbsp;&nbsp; Let’s assume I change the value of startWidth to 0.1.</p><p><a href="http://wijmo.com/wp-content/uploads/2012/02/image11.png" class="thickbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb11.png" width="330" height="90"></a></p><p>Pretty cool, huh?&nbsp; Last option is for startDistance and endDistance.&nbsp; This changes where on gauge the fill starts to render.&nbsp; For example, I’ll change startDistance to .095 and endDistance to .75 (width is also set back to .5).&nbsp; The rendered result will “tilt” the range.&nbsp;</p><p><a href="http://wijmo.com/wp-content/uploads/2012/02/image12.png" class="thickbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb12.png" width="330" height="90"></a></p><p>Why would this be useful?&nbsp; Here’s a great example over in the Wijmo control explorer.&nbsp; It shows how ranges can provide a cool visual effect for showing scale.</p><p><a href="http://wijmo.com/wp-content/uploads/2012/02/image13.png" class="thickbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb13.png" width="101" height="449"></a></p><p>And there you have it.&nbsp; All the basics you need to know in order to get started with Wijmo’s linear gauges.&nbsp; I hope you enjoy working with them!&nbsp; If you have any questions, feel free to shoot me an email or ask in the comments.</p><p><strong>Kevin Griffin</strong><br /><a href="mailto:keving@componentone.com">keving@componentone.com</a></p><p><a href="http://twitter.com/1kevgriff" target="_blank">Follow Me on Twitter</a></p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/wijmo-wednesday-measure-up-with-linear-gauges/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>More Grid Magic with Wijmo</title><link>http://wijmo.com/more-grid-magic-with-wijmo/</link> <comments>http://wijmo.com/more-grid-magic-with-wijmo/#comments</comments> <pubDate>Thu, 02 Feb 2012 18:02:28 +0000</pubDate> <dc:creator>Kevin Griffin</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[grids]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[Wijmo]]></category><guid isPermaLink="false">http://wijmo.com/?p=1475</guid> <description><![CDATA[Last week, I did a webcast on building Grids with Wijmo and ASP.NET MVC.  If you didn’t get a chance to see it, the video should be available soon.  However, this blog post is designed to tell you everything you need to know about using Wijmo Grids in your applications. If you’re converting existing &#60;tables&#62; [...]]]></description> <content:encoded><![CDATA[<p>Last week, I did a webcast on building Grids with Wijmo and ASP.NET MVC.  If you didn’t get a chance to see it, the video should be available soon.  However, this blog post is designed to tell you everything you need to know about using Wijmo Grids in your applications.</p><p>If you’re converting existing &lt;tables&gt; into Grids, you’ll want to give <a href="http://wijmo.com/wijmo-wednesday-grid-magic/" target="_blank">this post</a> a quick read.  Done?  Cool, because now we’re going to add a whole bunch of awesome to our new grids.</p><p>For this example, we’re going to start with a new grid:</p><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb.png" border="0" alt="image" width="660" height="204" /></a></p><pre class="brush: js"><br />
&lt;table id=&quot;tableDepartmentInformation&quot;&gt;<br />
    &lt;thead&gt;<br />
        &lt;tr&gt;<br />
            &lt;th&gt;First Name<br />
            &lt;/th&gt;<br />
            &lt;th&gt;Last Name&lt;/th&gt;<br />
            &lt;th&gt;Department&lt;/th&gt;<br />
        &lt;/tr&gt;<br />
    &lt;/thead&gt;<br />
    &lt;tbody&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Kevin&lt;/td&gt;<br />
            &lt;td&gt;Griffin&lt;/td&gt;<br />
            &lt;td&gt;Marketing&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Rich&lt;/td&gt;<br />
            &lt;td&gt;Dudley&lt;/td&gt;<br />
            &lt;td&gt;Marketing&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Chris&lt;/td&gt;<br />
            &lt;td&gt;Bannon&lt;/td&gt;<br />
            &lt;td&gt;Development&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Johnny&lt;/td&gt;<br />
            &lt;td&gt;Doe&lt;/td&gt;<br />
            &lt;td&gt;Management&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Tommy&lt;/td&gt;<br />
            &lt;td&gt;Tutone&lt;/td&gt;<br />
            &lt;td&gt;IT&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Joe&lt;/td&gt;<br />
            &lt;td&gt;Montana&lt;/td&gt;<br />
            &lt;td&gt;IT&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Ingio&lt;/td&gt;<br />
            &lt;td&gt;Montoya&lt;/td&gt;<br />
            &lt;td&gt;Freelance&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
            &lt;td&gt;Luke&lt;/td&gt;<br />
            &lt;td&gt;Skywalker&lt;/td&gt;<br />
            &lt;td&gt;Jedi&lt;/td&gt;<br />
        &lt;/tr&gt;<br />
    &lt;/tbody&gt;<br />
&lt;/table&gt;</p>
<p>&lt;script type=&quot;text/javascript&quot;&gt;<br />
    $(document).ready(function () {<br />
$(&quot;#tableDepartmentInformation&quot;).wijgrid();<br />
});<br />
&lt;/script&gt;<br />
</pre><h2>Sorting</h2><p>First thing we want to do is add basic sorting to this application.  All we have to do is add the <strong>allowSorting</strong> property to the wijgrid method.</p><pre class="brush: js"><br />
$(&quot;#tableDepartmentInformation&quot;).wijgrid(<br />
                {<br />
                    allowSorting: true<br />
                });<br />
</pre><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb1.png" border="0" alt="image" width="660" height="205" /></a></p><p>Wasn’t that easy!</p><h2>Paging</h2><p>Now let’s say you get a request from your clients to add paging to the grids.  This is a common request since grids can quickly get out of hand when you’re dealing with a lot of data.  To quickly enable paging, you’ll want to set the <strong>allowPaging</strong> property.  By default, WijGrid will default to a <strong>pageSize </strong>of 10, but you can override that by setting <strong>pageSize</strong> yourself.</p><pre class="brush: js"><br />
$(&quot;#tableDepartmentInformation&quot;).wijgrid(<br />
{<br />
     allowPaging: true,<br />
     pageSize: 2<br />
});<br />
</pre><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb2.png" border="0" alt="image" width="644" height="105" /></a></p><h2>Filtering</h2><p>A filter is a component of the grid that allows you to filter down results by column values.  For example, if you want to return all users in the grid whose Department is equal to Marketing, you can use a filter for that.  To add this feature, you’ll want to set the <strong>showFilter</strong> property.</p><pre class="brush: js"><br />
$(&quot;#tableDepartmentInformation&quot;).wijgrid(<br />
{<br />
     showFilter: true<br />
});<br />
</pre><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image3.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb3.png" border="0" alt="image" width="660" height="127" /></a></p><h2>Grouping</h2><p>A group is a logical ordering of rows by the columns that you select.  For example, we want to group all the rows in our grid by their Department.  A filter won’t work because we still want to see all departments, and sorting kinda works, but it doesn’t allow you to open or collapse the groups.  To enable grouping on this grid, we’ll want to set the <strong>allowColMoving</strong> property to true as well as the <strong>showGroupArea</strong> property.  When this is done, you will be able to move columns to the “group area” and Wijmo will group them logically for you.</p><pre class="brush: js"><br />
$(&quot;#tableDepartmentInformation&quot;).wijgrid(<br />
{<br />
     allowColMoving: true,<br />
     showGroupArea: true<br />
});<br />
</pre><p><a class="thickbox" href="http://wijmo.com/wp-content/uploads/2012/02/image4.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://wijmo.com/wp-content/uploads/2012/02/image_thumb4.png" border="0" alt="image" width="660" height="345" /></a></p><h2>Wrapping up</h2><p>There you have it!  In a few lines of code, we took our new WijGrid and added sorting, paging, filtering, and grouping.  I hope this aids you in your travels of Wijmo.  In an upcoming post, I’m going to talk about moving all this functionality to the server for performance increases galore!</p><p><strong>Kevin Griffin<br /> </strong><a href="mailto:KevinG@ComponentOne.com">KevinG@ComponentOne.com</a></p><p><a href="http://twitter.com/1kevgriff" target="_blank">Follow me on Twitter</a></p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/more-grid-magic-with-wijmo/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Get Wijmo v2 for the Holidays!</title><link>http://wijmo.com/get-wijmo-v2-for-the-holidays/</link> <comments>http://wijmo.com/get-wijmo-v2-for-the-holidays/#comments</comments> <pubDate>Thu, 22 Dec 2011 19:48:30 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Announcements]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[v2]]></category> <category><![CDATA[Wijmo]]></category> <category><![CDATA[Wijmo-Complete]]></category><guid isPermaLink="false">http://wijmo.com/?p=1395</guid> <description><![CDATA[Happy Holidays and Merry Wijmas to all! We have heard that the gift on everyone&#8217;s wish list this year is Wijmo v2. &#8220;All I want for the Holidays is Wijmo v2&#8243; &#8211; Everyone Team Wijmo is offering a couple gifts to you for the holidays to help you give the gift of Wijmo. Get 25% [...]]]></description> <content:encoded><![CDATA[<p><img src="http://wijmo.com/wp-content/uploads/2011/12/merrywijmas_text.png" alt="" title="Merry Wijmas" width="697" height="290" class="alignnone size-full wp-image-1399" /></p><p>Happy Holidays and Merry Wijmas to all! We have heard that the gift on everyone&#8217;s wish list this year is <a href="http://wijmo.com/v2-beta/">Wijmo v2</a>.</p><blockquote><p>&#8220;All I want for the Holidays is Wijmo v2&#8243; &#8211; Everyone</p></blockquote><p>Team Wijmo is offering a couple gifts to you for the holidays to help you give the gift of Wijmo.</p><h2>Get 25% off Wijmo until 2012</h2><p>We are offering 25% off on Wijmo from now until the end of the year. So you can buy as much Wijmo as you want thought December 31st 2011 at a 25% discount!</p><p>Discount code: <strong>wijmas2011</strong><br /> <em>25% off good December 22nd through December 31st 2011</em><br /> <a href="https://wijmo.com/purchase/">Purchase Wijmo online</a></p><h2>Buy Now and Get v2 for Free</h2><p>We have had a ton of people asking about when <a href="http://wijmo.com/v2-beta/">Wijmo v2</a> will launch and if they will be eligible for an upgrade. Instead of the normal 30 day upgrade we have decided that anyone who purchases anytime during the v2 Beta will get a <strong>free upgrade to Wijmo v2</strong> when it releases. <a href="https://wijmo.com/purchase/">Purchase Wijmo now</a> to lock in your v2 license!</p><p>Please take some time to check out the festive new widgets in the <a href="http://wijmo.com/v2-beta/">v2 Beta</a>!</p><h3>The Gift that Keeps Giving</h3><p>This year, give the  gift that keeps giving. Give the gift of widgets. Or you can always treat yourself to something nice. Go ahead, you deserve it. Let us write the JavaScript while you sit by the fire enjoying the holiday season.</p><p>Happy Holidays &#8211; Team Wijmo</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/get-wijmo-v2-for-the-holidays/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>A Guide to Wijmo Theming</title><link>http://wijmo.com/a-guide-to-wijmo-theming/</link> <comments>http://wijmo.com/a-guide-to-wijmo-theming/#comments</comments> <pubDate>Fri, 28 Oct 2011 11:00:34 +0000</pubDate> <dc:creator>Kevin Griffin</dc:creator> <category><![CDATA[Sample]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[themeroller]]></category> <category><![CDATA[Wijmo]]></category><guid isPermaLink="false">http://wijmo.com/?p=1279</guid> <description><![CDATA[One of the major features of Wijmo is that it’s built on top of the jQuery plugin model. The benefit of this is that the Wijmo team took great care into making sure that you got the benefits of working with jQueryUI widgets. The major benefit being ThemeRoller support. I always find it amazing when [...]]]></description> <content:encoded><![CDATA[<p>One of the major features of Wijmo is that it’s built on top of the jQuery plugin model.  The benefit of this is that the Wijmo team took great care into making sure that you got the benefits of working with jQueryUI widgets.  The major benefit being ThemeRoller support.</p><p><a href="http://our.componentone.com/wp-content/uploads/2011/09/image1.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" src="http://our.componentone.com/wp-content/uploads/2011/09/image_thumb1.png" border="0" alt="image" width="644" height="415" /></a></p><p>I always find it amazing when I talk to people and people haven’t heard about ThemeRoller.   It’s just the greatest thing since sliced bread.</p><h2>ThemeRoller</h2><p>When jQueryUI was released, it provided a great array of user interface widgets for you to use in your applications.  However, if you’ve used other component packs you know that theming can be really really hard or really really easy.  Developers don’t really do theming or design well, so that’s where the ThemeRoller tool was born.</p><p>ThemeRoller lets you or another person design themes for your sites.  It’s developer friendly, and awesome if you have a designer on your team.  Build your own custom themes or tweak one of the many existing ones.</p><p><a href="http://our.componentone.com/wp-content/uploads/2011/09/image2.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" src="http://our.componentone.com/wp-content/uploads/2011/09/image_thumb2.png" border="0" alt="image" width="133" height="484" /></a></p><p>When I used to do consulting, I used &lt;COMPETITOR NAME REDACTED&gt;’s toolset.  But it was so frustrating to do a lot of stuff that should be similar in terms of theming.  Instead, I rewrote the majority of the site with jQueryUI widgets.  I provided the ThemeRoller tool to my designer and within the day, she provided me the CSS file I needed to add to my project.  It’s just that easy!</p><h2>How Wijmo Uses ThemeRoller</h2><p>Out of the box, Wijmo uses ThemeRoller themes.  You don’t have to do ANYTHING.  Imagine you have a grid:</p><p><a href="http://our.componentone.com/wp-content/uploads/2011/09/image3.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" src="http://our.componentone.com/wp-content/uploads/2011/09/image_thumb3.png" border="0" alt="image" width="644" height="380" /></a></p><p>It’s a nice grid, but you like the “Redmond” style better.  That’s cool, just replace the CSS file.</p><p><a href="http://our.componentone.com/wp-content/uploads/2011/09/image4.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" src="http://our.componentone.com/wp-content/uploads/2011/09/image_thumb4.png" border="0" alt="image" width="644" height="348" /></a></p><p>BOOM!  You’re done.</p><h2>Editing Themes</h2><p>I’m bringing this note up since someone asked a question in the forums.  How do you edit a theme after you’ve downloaded it?  That’s easy!</p><p>First, open up the CSS file.  Scroll down a couple lines until you find this comment:</p><p><a href="http://our.componentone.com/wp-content/uploads/2011/09/image5.png"><img style="padding-left: 0px;padding-right: 0px;padding-top: 0px;border: 0px" src="http://our.componentone.com/wp-content/uploads/2011/09/image_thumb5.png" border="0" alt="image" width="644" height="107" /></a></p><p>Note:  if CSS is minified, you won’t see this.</p><p>See that link at the bottom, paste it into your browser and go.  ThemeRoller will automatically load all the settings for that theme.  Make your changes and download the new style.  This is handy on jQueryUI updates.  If they add new widgets, you can just load the file into ThemeRoller and it’ll create an updated style sheet for the theme.</p><p>So go have fun!  Let me know if you have questions or comments!  Go have fun with ThemeRoller, and make Wijmo your own!</p><p>Kevin Griffin<br /> <a href="mailto:keving@componentone.com">keving@componentone.com</a></p><p>Follow me on Twitter <a href="http://twitter.com/1kevgriff">@1kevgriff</a></p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/a-guide-to-wijmo-theming/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Wijmo 1.5.0 Released</title><link>http://wijmo.com/wijmo-1-5-0-released/</link> <comments>http://wijmo.com/wijmo-1-5-0-released/#comments</comments> <pubDate>Wed, 05 Oct 2011 14:53:39 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Announcements]]></category> <category><![CDATA[Release]]></category> <category><![CDATA[globalize]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[Wijmo-Complete]]></category><guid isPermaLink="false">http://wijmo.com/?p=1255</guid> <description><![CDATA[Wijmo 1.5 has dropped! We have some enhancements and a major change in globalization. Breaking Change! Important: We have migrated from jQuery.Globalization to Globalize. We are working with the jQuery UI team on the Grid Project and on thing thing that has come out of it is a refactoring of the globalization plugin. jQuery UI has [...]]]></description> <content:encoded><![CDATA[<p>Wijmo 1.5 has dropped! We have some enhancements and a major change in globalization.</p><h2>Breaking Change!</h2><p><strong>Important: </strong>We have migrated from jQuery.Globalization to Globalize.</p><p>We are working with the jQuery UI team on the Grid Project and on thing thing that has come out of it is a refactoring of the globalization plugin. jQuery UI has made Globalize which is a localization tool to use beyond jQuery. Moving forward they will be supporting and using this library. We wanted to do the same. It is very easy to change support in your code for this.</p><h3>Fix your references</h3><p>Change your references from:</p><pre>&lt;script src="http://cdn.wijmo.com/external/jquery.glob.min.js" type="text/javascript"&gt;&lt;/script&gt;</pre><p>To this:</p><pre>&lt;script src="http://cdn.wijmo.com/external/globalize.min.js" type="text/javascript"&gt;&lt;/script&gt;</pre><h3>Update your code</h3><p>Change any code you have using $.format from:</p><pre>$.format(</pre><p>To this:</p><pre>Globalize.format(</pre><p>We just had a couple samples that needed updated for Pie Charts that used format in tooltips to create percentages. So if you copied any code from Pie Chart samples you should do a search for $.format in your project.</p><h2>Chart Enhancement</h2><p>We added collision detection to the tooltips in our charts so now they will not get cut off be the edge of the SVG element.</p><div id="attachment_1258" class="wp-caption alignnone" style="width: 490px"><img class="size-full wp-image-1258" title="Tooltip edge collision detection" src="http://wijmo.com/wp-content/uploads/2011/10/chart-tooltip-collision.png" alt="" width="480" height="205" /><p class="wp-caption-text">Tooltip edge collision detection</p></div><h2>Grid Enhancements</h2><p>Added new events called <strong>filtering </strong>and <strong>filtered</strong> to the event model. These can be used before and after filtering is done in the Filter Row.</p><p>Added numeric input widget as the filter editor when the column is formatted as a percentage.</p><h2>Go get it!</h2><p>Make sure to <a href="http://wijmo.com/downloads/">download the latest version of Wijmo</a> and read the change log!</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/wijmo-1-5-0-released/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Wijmo 1.4.0 Released</title><link>http://wijmo.com/wijmo-1-4-0-released/</link> <comments>http://wijmo.com/wijmo-1-4-0-released/#comments</comments> <pubDate>Wed, 03 Aug 2011 20:14:54 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Announcements]]></category> <category><![CDATA[Release]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[themeroller]]></category> <category><![CDATA[Wijmo]]></category> <category><![CDATA[Wijmo-Complete]]></category> <category><![CDATA[Wijmo-Open]]></category><guid isPermaLink="false">http://wijmo.com/?p=1190</guid> <description><![CDATA[That&#8217;s right 1.4.0 is here already. Hint, we are well on our way to a 2.0! This added some nice new features and fixed quite a few bugs. New Theme &#8211; Arctic We added a new premium theme called &#8220;Arctic&#8221;. It is a very clean gray theme that works pretty much everywhere. Grid &#8211; Added [...]]]></description> <content:encoded><![CDATA[<p>That&#8217;s right 1.4.0 is here already. <em>Hint, we are well on our way to a 2.0!</em></p><p>This added some nice new features and fixed quite a few bugs.</p><p>New Theme &#8211; Arctic<br /> We added a new premium theme called &#8220;Arctic&#8221;. It is a very clean gray theme that works pretty much everywhere.<br /> <img src="http://wijmo.com/wp-content/uploads/2011/08/wijmo-menu-arctic-300x222.png" alt="" title="wijmo-menu-arctic" width="300" height="222" class="alignnone size-medium wp-image-1191" /></p><p>Grid &#8211; Added nested grouping<br /> We added showGroupArea and groupAreaCaption options to provide a convenient way of grouping by as many columns as the end users wants. The end users can drag column headers to the top bar to create nested groups of data by column. Check out the <a href="http://wijmo.com/demo/explore/#grid|group-area">new nested grouping feature</a> in action.<br /> <a href="http://wijmo.com/wp-content/uploads/2011/08/wijmo-grid-grouparea.png"><img src="http://wijmo.com/wp-content/uploads/2011/08/wijmo-grid-grouparea.png" alt="" title="wijmo-grid-grouparea" class="alignnone size-large wp-image-1192" /></a></p><p>We fixed a ton of bugs from a rendering issue in Combobox to click events in Upload. Make sure to <a href="http://wijmo.com/downloads/">download the latest version of Wijmo</a> and read the change log!</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/wijmo-1-4-0-released/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Wijmo 1.3.0 Released</title><link>http://wijmo.com/wijmo-1-3-0-released/</link> <comments>http://wijmo.com/wijmo-1-3-0-released/#comments</comments> <pubDate>Mon, 13 Jun 2011 19:43:38 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Announcements]]></category> <category><![CDATA[Release]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[Wijmo]]></category> <category><![CDATA[Wijmo-Complete]]></category> <category><![CDATA[Wijmo-Open]]></category><guid isPermaLink="false">http://wijmo.com/?p=1166</guid> <description><![CDATA[We have been hard at work getting Wijmo releases out the door. It&#8217;s hard to believe we are already at 1.3.0! This release has an awesome new widget, a bunch of cool new features and a few breaking changes. New Widget Explorer In case you missed it, we recently released an all new widget explorer [...]]]></description> <content:encoded><![CDATA[<p>We have been hard at work getting Wijmo releases out the door. It&#8217;s hard to believe we are already at 1.3.0! This release has an awesome new widget, a bunch of cool new features and a few breaking changes.</p><h3>New Widget Explorer</h3><p>In case you missed it, we recently released an all new widget explorer too! Check it out.<br /> <a href="http://wijmo.com/demos/explore/"><img class="alignnone size-medium wp-image-1167" title="New Wijmo Widget Explorer" src="http://wijmo.com/wp-content/uploads/2011/06/widget-explorer-300x237.png" alt="New Wijmo Widget Explorer" width="300" height="237" /></a></p><h3>New Widget: Upload</h3><p>This release features a <strong>preview</strong> of our new upload widget. It supports batch or single uploads and has an API for displaying upload progress.<br /> <a href="http://wijmo.com/demo/explore/#upload|overview"><img class="alignnone size-full wp-image-1168" title="Wijmo Upload Widget" src="http://wijmo.com/wp-content/uploads/2011/06/upload.png" alt="Wijmo Upload Widget" width="425" height="197" /><br /> </a></p><h3>New Features: Chart Animations</h3><p>One of the coolest new features in Wijmo is the refactored animation in our charts! We have added a new options to Bar Chart, Line Chart and Pie Chart called seriesTransition. This new options controls animation when the chart series data changes. As you can see in the demo it makes visualizing live charting much more smooth.</p><p>We have added support for  named easing equations in all of our charts: &#8220;easeInCubic&#8221;,&#8221;easeOutCubic&#8221;,&#8221;easeInBack&#8221;,&#8221;easeOutBack&#8221;,&#8221;easeOutElastic&#8221;,&#8221;easeOutBounce&#8221;.</p><p>Line Chart now has a direction option for animation to control how the line is animated in when being drawn. Valid values are &#8220;vertical&#8221; and &#8220;horizontal&#8221;.<br /> <a href="http://wijmo.com/demo/explore/#linechart|animation"><img class="alignnone size-medium wp-image-1172" title="Animated Chart Transitions" src="http://wijmo.com/wp-content/uploads/2011/06/chart-seriesTransition-300x189.png" alt="Animated Chart Transitions" width="300" height="189" /></a></p><h3>Breaking Changes in 1.3.0</h3><p>We standardized on event naming to ensure consistency within the toolkit.  All events are now lower camel-case. For example, pageindexchanging was renamed to pageIndexChanging in the Grid.</p><p>We also standardized the animation in all of our charts. Each chart now has the same animation option with the same default values: {enabled:true, duration:2000, easing:&#8221;&gt;&#8221;}. Some options are added on top of this core for chart type specific animations like &#8220;direction&#8221; in Line Chart.</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/wijmo-1-3-0-released/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>HTML5 Charting with jQuery and SVG</title><link>http://wijmo.com/html5-charting-with-jquery-and-svg/</link> <comments>http://wijmo.com/html5-charting-with-jquery-and-svg/#comments</comments> <pubDate>Mon, 25 Apr 2011 19:40:33 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Sample]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[jQueryUI]]></category> <category><![CDATA[SVG]]></category> <category><![CDATA[Wijmo]]></category> <category><![CDATA[Wijmo-Complete]]></category><guid isPermaLink="false">http://wijmo.com/?p=1111</guid> <description><![CDATA[Recently, we released our first version of Wijmo &#8211; our next generation of UI for the Web. Now, it&#8217;s time to look under the hood at some of the coolest widgets in Wijmo, the SVG Charts! As we see modern browsers launching new versions left (Firefox 4) and right (IE9), we hear a lot about [...]]]></description> <content:encoded><![CDATA[<p>Recently, we released our first version of <a href="http://wijmo.com/">Wijmo</a> &#8211; our next generation of UI for the Web. Now, it&#8217;s time to look under the hood at some of the coolest widgets in Wijmo, the <a href="http://wijmo.com/widgets/wijmo-complete/charts-bar-chart/">SVG Charts</a>!</p><p>As we see modern browsers launching new versions left (Firefox 4) and right (IE9), we hear a lot about HTML5. HTML5 is a working spec from the W3C that is defining a revolution in how we develop web apps.</p><p><img class="alignnone size-full wp-image-1117" title="HTML5" src="http://wijmo.com/wp-content/uploads/2011/04/html5-display.png" alt="HTML5 One Web for All" width="495" height="498" /></p><blockquote><p>Imagination, meet implementation. HTML5 is the cornerstone of the W3C&#8217;s open web platform; a framework designed to support innovation and foster the full potential the web has to offer.<br /> -W3C</p></blockquote><p>Pretty inspiring, but how does that help Web developers? Well, let&#8217;s take a look at how you can benefit from HTML5 today.</p><h3>Data Visualization via HTML5 and SVG</h3><p>Wijmo has <a href="http://wijmo.com/widgets/wijmo-complete/charts-bar-chart/">bar charts</a>, <a href="http://wijmo.com/widgets/wijmo-complete/charts-line-chart/">line charts</a> and <a href="http://wijmo.com/widgets/wijmo-complete/charts-pie-chart/">pie charts</a> all powered by inline Scalable Vector Graphics (SVG). This technology is not new, but it is new to most browsers. SVG is a powerful means of creating vector drawings in the browser. Vector drawings can be scaled to any size without losing any quality. They also have a very small XML format. That makes SVG perfect for creating data visualizations for the Web. We have done all the hard work to make using SVG effortless. Check out the benefits of  charting with SVG.</p><h4>True Client-side Charting</h4><p>Our charts are actually drawn on the client and only require the data to be passed from the server. This eliminates the need for large graphics to be downloaded from the server. Since our charts are powered by SVG they are actually part of the DOM. Which means every aspect of our charts can be inspected, accessed and manipulated in JavaScript. They are perfect for building Ajax dashboards that have constantly-changing data. Nothing compares to being able to draw charts within the browser.</p><h4>DOM-friendly</h4><p>jQuery development is all about the DOM, so we built charts that not only utilized the DOM, but are completely a part of it. We are drawing SVG elements in the DOM. That means you can easily access the chart elements in JavaScript. With SVG, you can easily attach events to elements like &#8220;click&#8221; and &#8220;hover&#8221;. You can also easily manipulate the elements like changing colors and positions. Most importantly, you can debug SVG elements in the browser. That&#8217;s right; you can literally inspect every SVG element of our charts in Firebug. That is one of the major benefits of using SVG instead of Canvas.</p><h4>Hardware Accelerated Graphics</h4><p>Our charting is all about performance and SVG makes high-performance charting possible. SVG is now being hardware accelerated in every modern browser. Our charts written in JavaScript are actually utilizing powerful rendering engines in these browsers instead of drawing static images on the server. Browser vendors are putting a lot of work into making SVG even better in their browsers. That means our charts will just get faster as new versions come out.</p><h4>Interactive Animations and Tooltips</h4><p>SVG also allows us to make our charts more than static images on the Web. The Wijmo charts are fully interactive with built-in animations, transitions and tooltips. Adding interaction to your data is very important to User Experience (UX). We recognize that and have made doing so effortless. Our charts have animation that can be turned on with one property. When turned on, the points, lines and slices will animate when they are hovered over. The charts will also show smooth transitions when data is first loaded into them. It is important to keep charts informative yet uncluttered. Our charts have built-in tooltips that help you hide labels until they are needed. Tooltips are useful for popping up information when specific parts of the charts are selected. These rich interactions can take data from boring to brilliant. Check out some <a href="http://wijmo.com/demos/explore/#piechart|animation">samples of our interactive charts</a>.</p><h4>Streaming Visualizations</h4><p>Since SVG is drawn in the browser, the graphic can be transformed without refreshing the page. This feature creates powerful streaming charts for visualizing real-time data. The Wijmo charts can be used to display dynamic data. For instance, a line charts could be used to display live Stock Market data as it streams from a Web service.  The line and points of the chart can even be animated to show data as is progresses through time. When it comes to working with constantly-changing data, having the ability to stream it smoothly in the browser is very important. Wijmo charts make it easy to bring your streaming data to life. Check out this <a href="http://wijmo.com/demos/explore/#linechart|simulateData">sample of streaming data</a> in our line chart.</p><h4>Write Once, Run Anywhere (Without Plugins)</h4><p>Our charts render in SVG and require no  additional plugins. Many other charts have rich features like animation  and interaction. However, said charts require plugins to be installed on  the end user&#8217;s machine. While Flash and Silverlight make for great  charting tools, they have limitations. The obvious limitation is the  dependency on a plugin. Another limitations is their lack of support in  most modern Smart Phones. End users have come to expect rich experiences  on today&#8217;s mobile devices. When important parts of your application  don&#8217;t render on them, it is a problem. The good news is, most of these  mobile devices support SVG!  Our charts render beautifully on  iPhones, iPads, and many more devices.</p><h3>Start Charting in SVG with Wijmo</h3><p>OK, enough of all this talk. Let&#8217;s see some SVG charts in action! We are going to take a simple HTML table and turn it into a chart with just one line of code. The Wijmo charts are actually jQuery UI widgets. So they work by turning HTML elements into interactive widgets. Using a table is a means of representing data semantically and easily transforming it into a chart. You can also use a simple div element and provide the data to the widget in another form like JSON.</p><p>To start we need our script and stylesheet references. We are going to use all CDN references in this example:</p><pre>&lt;link href="http://cdn.wijmo.com/themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="http://cdn.wijmo.com/jquery.wijmo-open.1.1.5.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="http://cdn.wijmo.com/jquery.wijmo-complete.1.1.5.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.11/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="http://cdn.wijmo.com/external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="http://cdn.wijmo.com/external/jquery.glob.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="http://cdn.wijmo.com/external/jquery.mousewheel.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="http://cdn.wijmo.com/external/raphael-min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="http://cdn.wijmo.com/jquery.wijmo-open.1.1.5.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="http://cdn.wijmo.com/jquery.wijmo-complete.1.1.5.min.js" type="text/javascript"&gt;&lt;/script&gt;</pre><p>Note: Make sure you always use the most recent version of the <a href="http://wijmo.com/downloads/cdn/">CDN here</a>.</p><p>Now we create a simple HTML table with a bit of data in it. Here is the markup for our table:</p><pre style="height: 300px;">&lt;table id="tb" border="1"&gt;
    &lt;caption&gt;
        Hardware Sales by Category&lt;/caption&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;/td&gt;
            &lt;th&gt;
                Desktops
            &lt;/th&gt;
            &lt;th&gt;
                Notebooks
            &lt;/th&gt;
            &lt;th&gt;
                Tablets
            &lt;/th&gt;
            &lt;th&gt;
                Phones
            &lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;th scope="row"&gt;
                Q1
            &lt;/th&gt;
            &lt;td&gt;
                64594.6
            &lt;/td&gt;
            &lt;td&gt;
                32760.69
            &lt;/td&gt;
            &lt;td&gt;
                62973.35
            &lt;/td&gt;
            &lt;td&gt;
                23432.04
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;th scope="row"&gt;
                Q2
            &lt;/th&gt;
            &lt;td&gt;
                74933.4
            &lt;/td&gt;
            &lt;td&gt;
                25261.26
            &lt;/td&gt;
            &lt;td&gt;
                39395.51
            &lt;/td&gt;
            &lt;td&gt;
                41129.49
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;th scope="row"&gt;
                Q3
            &lt;/th&gt;
            &lt;td&gt;
                39269.73
            &lt;/td&gt;
            &lt;td&gt;
                17746.36
            &lt;/td&gt;
            &lt;td&gt;
                20775.42
            &lt;/td&gt;
            &lt;td&gt;
                16430.82
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;th scope="row"&gt;
                Q4
            &lt;/th&gt;
            &lt;td&gt;
                55709.52
            &lt;/td&gt;
            &lt;td&gt;
                19976.28
            &lt;/td&gt;
            &lt;td&gt;
                39878.09
            &lt;/td&gt;
            &lt;td&gt;
                18992.22
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;</pre><p>This table just represents some sales data for four quarters in a year across four product lines. It should look like this when rendered:<br /> <a href="http://wijmo.com/demos/explore/#linechart|withtable"><img class="alignnone size-full wp-image-1128" title="Table of Sales data" src="http://wijmo.com/wp-content/uploads/2011/04/table.png" alt="Table of Sales data" width="562" height="123" /></a></p><p>While it looks ok, we can make this data more meaningful by charting it. We can do that by adding  a little jQuery magic:</p><pre>$("#tb").wijlinechart();</pre><p>That&#8217;s it! You literally only need that one line of jQuery and you have turned this plain onld HTML table into an interactive SVG chart.</p><p>And here is what our new chart will look like when it renders.</p><p><a href="http://wijmo.com/demo/wijmoverflow/"><img class="alignnone size-full wp-image-1133" title="Line Chart Created from HTML Table" src="http://wijmo.com/wp-content/uploads/2011/04/linechart-fromtable.png" alt="Line Chart Created from HTML Table" width="583" height="272" /></a></p><p>Pretty cool huh? Now, that was just a simple implementation. You could add all sorts of options and Ajax calls to build a fully interactive dashboard. In fact, we built a nice little dashboard using the StackOverflow API. It loads all data asynchronously from a Web service and then plots it in a Grid, Bar Chart, Line Chart and Pie Chart. You can play around with the <a href="http://wijmo.com/demo/wijmoverflow/">StackOverflow dashboard online</a>. Here is a snapshot of how it looks:</p><p><a href="http://wijmo.com/wp-content/uploads/2011/04/wijmoverflow-capture.png"><img class="alignnone size-medium wp-image-1134" title="StackOverflow Dashboard Built with Wijmo" src="http://wijmo.com/wp-content/uploads/2011/04/wijmoverflow-capture-233x300.png" alt="StackOverflow Dashboard Built with Wijmo" width="233" height="300" /></a></p><h3>Try it for Yourself!</h3><p>Now go build something cool with Wijmo charts! We believe that SVG and HTML5 are the future of the Web when comes to data visualization. Give them a try and let us know what you think.</p><p><a href="http://wijmo.com/downloads/">Download Wijmo</a></p><p><a href="http://wijmo.com/demos/">Check out more Wijmo samples</a></p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/html5-charting-with-jquery-and-svg/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> </channel> </rss>
<!-- Served from: wijmo.com @ 2013-05-24 00:13:15 by W3 Total Cache -->