<?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; Showcase</title> <atom:link href="http://wijmo.com/category/showcase/feed/" rel="self" type="application/rss+xml" /><link>http://wijmo.com</link> <description>UI for the Web</description> <lastBuildDate>Wed, 22 May 2013 17:28:08 +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>Using Knockout with the WijCarousel</title><link>http://wijmo.com/using-knockout-with-the-wijcarousel/</link> <comments>http://wijmo.com/using-knockout-with-the-wijcarousel/#comments</comments> <pubDate>Wed, 15 May 2013 13:00:45 +0000</pubDate> <dc:creator>Chris Karkowsky</dc:creator> <category><![CDATA[Sample]]></category> <category><![CDATA[Showcase]]></category> <category><![CDATA[Tutorials]]></category><guid isPermaLink="false">http://wijmo.com/?p=13224</guid> <description><![CDATA[Recently added with the release 2013v1 of Wijmo was an addition to the Knockout library enabling two way bindable functionality for the Data of the WijCarousel. This is perfect for those who want to manage the content of their carousel on the fly. In this example, I have decided to combine the checkbox functionality of [...]]]></description> <content:encoded><![CDATA[<p>Recently added with the release 2013v1 of Wijmo was an addition to the Knockout library enabling two way bindable functionality for the Data of the WijCarousel.  This is perfect for those who want to manage the content of their carousel on the fly.</p><p><img src="http://wijmo.com/wp-content/uploads/2013/05/bannerPic.jpg" alt="" /></p><p>In this example, I have decided to combine the checkbox functionality of the WijTree with the data of the WijCarousel.</p><p>I will treat each value within the Tree as a “node”, meaning that they will all have their own specific properties as defined within the Model…</p><pre>
function PictureNode(url, text)
{
        this.imageUrl = url,
        this.caption = text,
        this.text = text
}
</pre><p>The “imageUrl” and “caption” properties are both necessary to insert pictures with captions into the WijCarousel, while the “text” property is used within the WijTree.</p><p>In order to populate the nodes within the WijTree, I will create two ko.observableArray’s.</p><pre>
self.west = ko.observableArray([]);
self.east = ko.observableArray([]);
</pre><p>For each of the WijTree’s, I will set the “nodes” option to their specific array, as well as set several properties.</p><pre>
&lt;ul id="westTree"data-bind="wijtree: {disabled: disabled, allowDrag: allowDrag, allowDrop:allowDrop,
    nodes: west, showCheckBoxes: showCheckBoxes, nodeCheckChanged: nodeCheckChangedWest }">
&lt;/ul>
</pre><p>For each of the WijCarousel’s, I will also create two ko.observableArrays, and push some initial data into them.</p><pre>
self.visNodesWest = ko.observableArray([
     new PictureNode("http://wijmo.com/files/img/logos/Hawks.png", "Chicago Blackhawks")
]);
self.visNodesEast = ko.observableArray([
     new PictureNode("http://wijmo.com/files/img/logos/Pens.png", "Pittsburgh Penguins")
]);
</pre><p>I will then do the data-bind for the WijCarousel, by setting the “data” option to each array, as well as set several more options.</p><pre>
&lt;div id="westCaro" data-bind="wijcarousel:{data:visNodesWest,showTimer:showTimer,
      display:display, auto:auto, interval:interval}" style="height:200px;">&lt;/div>
</pre><p>The WijTree has a built in function nodeCheckChanged, which will trigger anytime an option with in tree is checked or unchecked.  I will trigger this function each time a change is made, and use Knockout to fill each array of the array’s bound to the Carousel.</p><pre>
self.nodeCheckChangedWest = function(e,data)
{
	self.visNodesWest.remove(function(item){return item.text != "Chicago Blackhawks"});
	var nodes = $(this).wijtree("getCheckedNodes");

	$.each(nodes, function(index, elem)
	{
        	var text = $(elem).wijtreenode('option', 'text');
        	var url = $(elem).wijtreenode('option', 'imageUrl');
		self.visNodesWest.push(new PictureNode(url,text));
	});
};
</pre><p>When running, you will notice that once the team name is checked, the image will be added/removed from the WijCarousel.</p><p><img src="http://wijmo.com/wp-content/uploads/2013/05/Demo2.gif" alt="" /></p><p>This is a great way to let Knockout do all the heavy lifting for you, as well as create a live interface for your end user.</p><p>Let’s go Pens!</p><p>Sample code can be found <a href="http://wijmo.com/wp-content/uploads/2013/05/KOCarousel.html" title="here">here</a>.</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/using-knockout-with-the-wijcarousel/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How To Set Cell Value in SpreadJS</title><link>http://wijmo.com/how-to-set-cell-value-in-spreadjs/</link> <comments>http://wijmo.com/how-to-set-cell-value-in-spreadjs/#comments</comments> <pubDate>Mon, 13 May 2013 18:57:01 +0000</pubDate> <dc:creator>eric peng</dc:creator> <category><![CDATA[Sample]]></category> <category><![CDATA[Showcase]]></category> <category><![CDATA[SpreadJS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Binding]]></category> <category><![CDATA[Cell]]></category> <category><![CDATA[Csv]]></category> <category><![CDATA[How To]]></category> <category><![CDATA[Set Value]]></category><guid isPermaLink="false">http://wijmo.com/?p=13174</guid> <description><![CDATA[SpreadJS provides many ways to assign value to cells, you can choose any one of options below to set value of cells. 1. setValue/setText method Sheet object of SpreadJS has a method setValue, this method can be used to set value to any cell in viewport or headers by specific row and column index. The [...]]]></description> <content:encoded><![CDATA[<p>SpreadJS provides many ways to assign value to cells, you can choose any one of options below to set value of cells.<br /> 1. setValue/setText method<br /> Sheet object of SpreadJS has a method setValue, this method can be used to set value to any cell in viewport or headers by specific row and column index. The value can be any type of data like string, date time, boolean, number. In addition, the Sheet object has another method setText, you can use this method to set text to any cell in either viewport or header.</p><pre>sheet.setValue(0,2,"ColumnHeader", $.wijmo.wijspread.SheetArea.colHeader);
sheet.setValue(2,0,"RowHeader", $.wijmo.wijspread.SheetArea.rowHeader);
sheet.setValue(2,2,"viewport", $.wijmo.wijspread.SheetArea.viewport);</pre><p><img src="http://wijmo.com/wp-content/uploads/2013/05/setValue.png" alt="" title="setValue"/></p><p>2. Set value by Cell object<br /> Sheet object has two methods getCell and getCells, you can use them to get a Cell object which indicates a specific cell, or a range of cells, and use value/text method of Cell object to set value to a cell or a range of cells.</p><pre>sheet.getCell(0,0).text("cell");
sheet.getCells(1,1,3,3).value("range");</pre><p><img src="http://wijmo.com/wp-content/uploads/2013/05/getCells.png" alt="" title="getCells" /><br /> 3. Binding to JSon array<br /> You can create a JSON array, and bind it to Sheet object by using the setDataSource method.</p><pre>var arr = [
{"Series0":2,"Series1":1},
{"Series0":4,"Series1":2},
{"Series0":3,"Series1":4}
];
sheet.setDataSource(arr);</pre><p><img src="http://wijmo.com/wp-content/uploads/2013/05/setDataSrouce.png" alt="" title="setDataSrouce"/><br /> 4. Import CSV text<br /> You can import a CSV text string into a range of cells by using the setCsv method of Sheet object.</p><pre>var csv = "1,2,3;a,b,c";
sheet.setCsv(1,1,csv,";",",");</pre><p><img src="http://wijmo.com/wp-content/uploads/2013/05/setCsv.png" alt="" title="setCsv"/></p><p>You can try all of the above code in a web page which has initialized SpreadJS, to learn more about getting started with SpreadJS in a web page, please read <a href="http://wijmo.com/four-steps-to-use-spreadjs/">Quick Start Guide to Using SpreadJS</a>.</p><p>For more information about how to use SpreadJS, includes its data model and API, please read our <a href="http://wijmo.com/docs/spreadjs/webframe.htm">online documentation</a> or try <a href="http://wijmo.com/demos/">online demos</a>.</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/how-to-set-cell-value-in-spreadjs/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Wijmoscilloscope: The Power of Knockout</title><link>http://wijmo.com/wijmoscilloscope-the-power-of-knockout/</link> <comments>http://wijmo.com/wijmoscilloscope-the-power-of-knockout/#comments</comments> <pubDate>Thu, 14 Feb 2013 17:09:44 +0000</pubDate> <dc:creator>Chris Karkowsky</dc:creator> <category><![CDATA[Sample]]></category> <category><![CDATA[Showcase]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[chart]]></category> <category><![CDATA[grid]]></category> <category><![CDATA[knockout]]></category> <category><![CDATA[mvvm]]></category> <category><![CDATA[sliders]]></category> <category><![CDATA[wijchart]]></category> <category><![CDATA[wijgrid]]></category><guid isPermaLink="false">http://wijmo.com/?p=11428</guid> <description><![CDATA[Wijmo is a fantastic tool to make your data visible.  Along with its partner Knockout, you can tie all of your information easily and elegantly. This got me to thinking, “What kind of data would I want to see easily?” Coming for an engineering background, I used pretty much everything under the sun (graphing calculators, [...]]]></description> <content:encoded><![CDATA[<p>Wijmo is a fantastic tool to make your data visible.  Along with its partner Knockout, you can tie all of your information easily and elegantly.</p><p>This got me to thinking, “What kind of data would I want to see easily?”</p><p>Coming for an engineering background, I used pretty much everything under the sun (graphing calculators, websites, different software) to interpret signals.  Probably the most useful tool of all was the oscilloscope.</p><p>In the simplest explanation, the oscilloscope is used to graph, manipulate, and measure an input signal.</p><p>For the purposes of this sample, I will keep the input signal simple and use the basic sine and cosine as functions of time:</p><p>y(t) = A * sin(2pi*f*t + <em>φ</em>)<em> </em>and<em> </em>y(t) = A * cos(2pi*f*t + <em>φ</em>)</p><p>where A = amplitude, f = frequency, and <em>φ </em>is the phase.</p><p>What do I want to see?</p><ol><li> A plot of the input function.</li><li>Individual point information on the plot.</li><li>Information about each point in grid form.</li><li>The formula for the input function.</li></ol><p>What do I want to do?</p><ol><li>Manipulate the input signal by changing the amplitude, frequency, and phase.</li><li>Perform the oscilloscope feature of shifting the input signal horizontally and vertically on the plot.</li><li>Scroll over the plot of the wave and see individual (x,y) coordinates.</li></ol><p>Using Wijmo and Knockout, all of this becomes possible, and most importantly, completely live.</p><p>Let’s begin with the ViewModel:</p><p>Using knockout observables, I am able to have a single integer value for each variable that will change about the input function and the plot.</p><pre> var self = this;

// declare observables that make up the object model
self.chartType = ko.observable("cos");
self.amp = ko.observable(1);
self.freq = ko.observable(1);
self.phase = ko.observable(0);
self.adjVert = ko.observable(0);
self.adjHorz = ko.observable(0);</pre><p>Using knockout computed values, I am able to write function to return a live updated string of the function formula.</p><pre> // formula for current equation
self.formula = ko.computed(function () {
    return "y(t) = " + self.amp() + " * " + self.chartType() + "(2 * pi * " + self.freq() + " * t + " + self.phase() + ")";
});</pre><p>&nbsp;</p><p>Also using knockout computed values, I am able to create an array of plot points based on the input function.  This list will be the common data for the chart and the grid, with no other manipulation necessary.</p><pre>// compute data for both grid and list
self.list = ko.computed(function () {
   var arr = [];

   for (var x = -3; x&lt;=3; x=x+.01){
    if (self.chartType() == "cos") {
       var y = self.amp() * Math.cos((6.28318 * self.freq() * x) +
               (self.phase() + self.adjHorz())) +
                self.adjVert();
       y = Math.round(10000 * y) / 10000;
   }
   else {
       var y = self.amp() * Math.sin((6.28318 * self.freq() * x) +
              (self.phase() + self.adjHorz())) +
              self.adjVert();
       y = Math.round(10000 * y) / 10000;
   }

   // push the computed point into the chart data
   x = Math.round(100*x)/100;
   var point = new DataPoint({ x: x, y: y });
   arr.push(point);
  }
return arr;
});
</pre><p>&nbsp;</p><p>For the Model, I will create individual DataPoints using Knockout observables.</p><pre>// datapoints that can be bound to both the chart and grid
function DataPoint(data) {
   this.x = ko.observable(data.x);
   this.y = ko.observable(data.y);
};</pre><p>&nbsp;</p><p>In the $(document).ready, I will bind the ViewModel, and set a few Wijmo decorators.</p><pre>$(document).ready(function () {

   // create and bind the ViewModel
   var vm = new viewModel();
   ko.applyBindings(vm);

   // wijmo Decorators
   $(":input[type='text'],:input[type='password'],textarea").wijtextbox();
   $(":input[type='button']").button();
});</pre><p>Inside of the body, I will use the Wijchart to plot the data, the Wijgrid to show each point, Wijsliders to manipulate the input function variable values and adjust the chart horizontally and vertically, and an HTML dropdown list to toggle sine/cosine for the input function.</p><h4>The Chart</h4><p>Notice the dataSource for the chart is bound to the list.  Inside of the SeriesList, I am able to bind the data to the X and Y values from the Model.  Inside of the hint, I can also bind the content according to the point hovered over:</p><p>&nbsp;</p><pre> &lt;div id="wijlinechart" data-bind="wijlinechart: {
	animation: {direction:'vertical'},
 	legend: {visible:false},
 	hint: {
		content: function() {
		 return 'X:' +
			this.x + '\nY:' + this.y;
		}
               },
	 showChartLabels: false,
         dataSource: list,
         seriesList: [{
		label: 'wave',
            	fitType: 'spline',
            	data: { x: { bind: 'x' }, y: { bind: 'y'} }
            	     }],
		axis: {
			 x: {
			      origin:0,
                              labels: { style: { rotation: -90 } },
			      annoMethod: 'valueLabels',
                              valueLabels: [-4,-3,-2,-1,0,1,2,3,4],
				           min: -3.14,
					   max: 3.14,
					   style: {'stroke-width': 2},
					   gridMajor: { visible: true},
			    },
			 y: {
                              max: 5,
			      min: -5,
		              autoMax: false,
			      autoMin: false,
			      style: {opacity: 1,'stroke-width': 6},
			      origin: 0,
                	    }
              	     }
	}"
      style="width:1000px;height:400px;"&gt; &lt;/div&gt;</pre><p>&nbsp;</p><h4>The Grid</h4><p>The Grid is also bound to the same list as the chart with no changes needed.</p><pre>&lt;table id ="wijgrid" data-bind="wijgrid: {
	allowPaging: true,
	pageSize: 10,
	data: list,
	ensureColumnPxWidth: true,
	columns: [
		    { dataType: 'number', dataFormatString: 'n2' },
		    { dataType: 'number', dataFormatString: 'n4' },
		]
	}"
 style="width:400px;"&gt;&lt;/table&gt;</pre><p>&nbsp;</p><h4>The Variable Sliders and Horizontal/Vertical Adjust</h4><p>Each is set up the same.  The Value of the slider will be bound to its knockout observable.</p><pre>&lt;div id ="phase" data-bind="wijslider: {
        orientation: 'horizontal',
        min: 0,
        max: 5,
        step: 1,
        value:phase}",
        style="width:300px;"&gt;&lt;/div&gt;</pre><h4>The Function</h4><p>Using a simple heading, I can bind the text to the Knockout computed value.</p><pre>&lt;h2 data-bind="text: formula"&gt;&lt;/h2&gt;</pre><p>That’s all of the good stuff.  Now let’s take it for a spin!</p><p><img src="http://wijmo.com/wp-content/uploads/2013/02/1.jpg" alt="" /></p><p>You can start moving the sliders to change the input function.  Notice how the data in the formula, chart, and grid change instantly!</p><p>Using the Knockout MVVM library along with Wijmo, you are able to create useful and interactive way to view your data with a relatively small amount of code.</p><p><img src="http://wijmo.com/wp-content/uploads/2013/02/2.jpg" alt="" /></p><p>Wijmo with a Knockout backbone prevails again!</p><p>Complete code can be found <a href="http://wijmo.com/wp-content/uploads/2013/02/wijmoscilloscopev2.html">here</a>.</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/wijmoscilloscope-the-power-of-knockout/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Using SpreadJS with Knockout</title><link>http://wijmo.com/using-spreadjs-with-knockout/</link> <comments>http://wijmo.com/using-spreadjs-with-knockout/#comments</comments> <pubDate>Mon, 28 Jan 2013 17:07:20 +0000</pubDate> <dc:creator>eric peng</dc:creator> <category><![CDATA[Sample]]></category> <category><![CDATA[Showcase]]></category> <category><![CDATA[SpreadJS]]></category> <category><![CDATA[knockout]]></category> <category><![CDATA[spread]]></category> <category><![CDATA[spreadsheet]]></category><guid isPermaLink="false">http://wijmo.com/?p=11076</guid> <description><![CDATA[SpreadJS supports Knockout (KO), a JavaScript library that uses the Model View View Model (MVVM) pattern, allowing you to easily create and maintain a dynamically changing UI. You can use KO in addition to jQuery to enhance your pages with an underlying data model. For a full KO introduction, tutorials, documentation, explanation of MVVM and [...]]]></description> <content:encoded><![CDATA[<p><a href="http://wijmo.com/spreadjs-alpha-has-landed/">SpreadJS</a> supports Knockout (KO), a JavaScript library that uses the Model View View Model (MVVM) pattern, allowing you to easily create and maintain a dynamically changing UI. You can use KO in addition to jQuery to enhance your pages with an underlying data model. For a full KO introduction, tutorials, documentation, explanation of MVVM and more, visit <a href="http://knockoutjs.com/" rel="nofollow">http://knockoutjs.com/</a>.</p><p>You can easily use Knockout with SpreadJS by following a few simple steps:<br /> 1. Add references to the latest jQuery dependencies, Wijmo widgets, Knockout .js file, and KO extension library for Wijmo.<br /> 2. Create the ViewModel and View: add JavaScript to define the data and behavior of the UI, and add markup to create the View—the visual, interactive UI.<br /> 3. Bind the SpreadJS widget to the ViewModel and activate KO.</p><p>Here is a sample of list-details mode UI for records editing, it will show you how to add references to the required files, create the ViewModel and View, and bind the SpreadJS widget. The first step is to create an .html page and add links to the dependencies to your project within the &lt;head&gt; tags. To do this, just link to the content delivery network (CDN) files:</p><pre>&lt;!-- jQuery --&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;!-- Knockout --&gt;
&lt;script type="text/javascript" src="http://cdn.wijmo.com/external/knockout-2.1.0.js"&gt;&lt;/script&gt;
&lt;!-- SpreadJS CSS and script --&gt;
&lt;link href="http://cdn.wijmo.com/themes/cobalt/jquery-wijmo.css" rel="stylesheet" type="text/css" title="rocket-jqueryui" /&gt;
&lt;link href="http://cdn.wijmo.com/spreadjs/gcfilter-ui.css" rel="stylesheet" title="metro-jqueryui" type="text/css" /&gt;
&lt;link href="http://cdn.wijmo.com/themes/wijmo/jquery.wijmo.wijsuperpanel.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="http://cdn.wijmo.com/spreadjs/jquery.wijmo.wijspread.full.min.js" type="text/javascript"&gt;&lt;/script&gt;</pre><p>Now a view model to define the sample data and behavior of the UI. Enter the following &lt;script&gt; within the &lt;head&gt; tags:</p><pre>function Pet(name, sales, price) {
    this.name = ko.observable(name);
    this.sales = ko.observable(sales);
    this.price = ko.observable(price);
}

var initialData = [
    new Pet("Well-Travelled Kitten", 352, 75.95),
    new Pet("Speedy Coyote", 89, 190.00),
    new Pet("Furious Lizard", 152, 25.00),
    new Pet("Indifferent Monkey", 1, 99.95),
    new Pet("Brooding Dragon", 0, 6350),
    new Pet("Ingenious Tadpole", 3940, 0.35),
    new Pet("Optimistic Snail", 420, 1.50)];

var PagedGridModel = function (items) {
    this.activeIndex = ko.observable(0);
    this.items = ko.observableArray(items);
    this.activeItem = ko.observable(this.items()[this.activeIndex()]);
    this.addItem = function () {
        this.items.push(new Pet("New item", 0, 100));
    };
};</pre><p>To create Textbox HTML elements and SpreadJS Widget, place the following markup within the body of the .html document.</p><pre>    &lt;div&gt;
        &lt;div&gt;
            &lt;h3&gt;Knockout List-Detail Binding Sample&lt;/h3&gt;
            &lt;p&gt;Name: &lt;input type="text" data-bind="value: activeItem().name" /&gt;&lt;/p&gt;
            &lt;p&gt;Sales: &lt;input type="value" data-bind="value: activeItem().sales" /&gt;&lt;/p&gt;
            &lt;p&gt;Price: &lt;input type="value" data-bind="value: activeItem().price" /&gt;&lt;/p&gt;
            &lt;br /&gt;
            &lt;div id="ss" data-bind="dataSource: items()" style="position:relative; width:640px; height:300px; border:1px solid grey"&gt;&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;</pre><p>Now create SpreadJS instance and bind to the ViewModel and activate knockout.js by adding the following JavaScript within the &lt;script&gt; tags after the ViewModel script:</p><pre>$("#ss").wijspread({ sheetCount: 1 });
var ss = $("#ss").wijspread("spread");
var vm = new PagedGridModel(initialData);
ko.applyBindings(vm);</pre><p>In addition provide some data field wrapper, and binding initialize and value sync logic:</p><pre>function name(item, value) {
    if (arguments.length == 2) {
        item["name"](value);
    } else {
        value = item["name"]();
        return value;
    }
}

function sales(item, value) {
    if (arguments.length == 2) {
        item["sales"](value);
    } else {
        value = item["sales"]();
        if (typeof (value) == "string" &amp;&amp; value.length &gt; 0) {
            value = parseInt(value);
        }
        return value;
    }
}

function price(item, value) {
    if (arguments.length == 2) {
        item["price"](value);
    } else {
        value = item["price"]();
        if (typeof (value) == "string" &amp;&amp; value.length &gt; 0) {
            value = parseFloat(value);
        }
        return value;
    }
}

ko.bindingHandlers.dataSource = {
    init: function (element, valueAccessor, allBindingsAccessor, viewModel) {
        var ss = $("#" + element.id).wijspread("spread");
        ss.getActiveSheet().autoGenerateColumns = false;
        ss.getActiveSheet().setDataSource(valueAccessor());
        var cis = [
            { name: "name", value: name },
            { name: "sales", value: sales },
            { name: "price", formatter: "$#,##0.00", value: price }];
        ss.getActiveSheet().bindColumns(cis);

        var cc = ss.getActiveSheet().getColumnCount();
        for (var i = 0; i &lt; cc; i++)
            ss.getActiveSheet().setColumnWidth(i, 160);
        ss.invalidateLayout();
        ss.repaint();
    },
    update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
        var ss = $("#" + element.id).wijspread("spread");
        ss.repaint();
    }
};</pre><p>When you open the page, it looks similar to the following image. Enter a new value in the TextBox and leave focus out. Notice the values in SpreadJS change to match the specified value, vice versa. Download the sample html page <a href="http://wijmo.com/wp-content/uploads/2013/01/koDemo.htm">here</a>.</p><p><a href="http://wijmo.com/wp-content/uploads/2013/01/KO.png"><img class="alignnone size-full wp-image-11084" title="KO" src="http://wijmo.com/wp-content/uploads/2013/01/KO.png" alt="" width="654" height="500" /></a></p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/using-spreadjs-with-knockout/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Schoolwires® finds success with HTML5 widgets from Wijmo</title><link>http://wijmo.com/schoolwires-finds-success-with-html5-widgets-from-wijmo/</link> <comments>http://wijmo.com/schoolwires-finds-success-with-html5-widgets-from-wijmo/#comments</comments> <pubDate>Tue, 07 Feb 2012 23:57:14 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Press Release]]></category> <category><![CDATA[Showcase]]></category><guid isPermaLink="false">http://wijmo.com/?p=1484</guid> <description><![CDATA[Education is a topic that garners attention. With their focus towards education, a State College, PA-based company, Schoolwires has developed a website and community management software solution named Centricity2™ that allows K-12 school districts to achieve a new level of success. Currently over 8,000 schools across the United States are using Centricity2. This revolutionary website [...]]]></description> <content:encoded><![CDATA[<p><img src="http://wijmo.com/wp-content/uploads/2012/02/sw-logo.png" alt="" title="Schoolwires" width="657" height="73" class="alignnone size-full wp-image-1487" /><br /> Education is a topic that garners attention. With their focus towards education, a State College, PA-based company, Schoolwires has developed a website and community management software solution named Centricity2™ that allows K-12 school districts to achieve a new level of success.</p><p>Currently over 8,000 schools across the United States are using Centricity2. This revolutionary website management solution is geared towards a large group of users, allowing teachers and other educators to create their own online community. Schoolwires provides the platform environment which allows its users to engage with the community, distribute the workload, and even build their own application on top of the system. This solution takes the meaning of playing in the Sandbox to a whole new level.</p><p><a href="http://wijmo.com/wp-content/uploads/2012/02/PageSummary.png"><img src="http://wijmo.com/wp-content/uploads/2012/02/PageSummary-300x266.png" alt="" title="Page Summary" width="300" height="266" class="alignleft size-medium wp-image-1489" /></a>The planning for Centricity2 began in 2008. At that time Schoolwires evaluated the .NET Framework and felt the “out-of-the-box” user interface controls were too dependent on the server side and needed a better client/presentation layer. Schoolwires’ development team began researching ways to move from .NET common controls to a lightweight AJAX solution paired with jQuery and looking for jQuery  plugins and UI controls.</p><p>Schoolwires looked to the community to find a solution for their user interface needs. Using Quora—an online question and answer community—the solution they found was a collection of over 30 jQuery UI Widgets named Wijmo. ComponentOne, the parent company to Wijmo, is a leading provider of data and UI controls for Window, Web, and Mobile development that has built a solid reputation for reliability for over 20 years. Additionally, the support and community built around ComponentOne offered Schoolwires the level of stability they needed.</p><blockquote><p> &#8220;I was really impressed with how the charts rendered identically in IE6 as they did in Chrome and Firefox.&#8221;</p></blockquote><p>To ensure they did their due diligence, Schoolwires evaluated another vendor’s offering and found it to be heavy and too .NET centric. Wijmo offered the light footprint and more modern approach that Schoolwires was seeking.</p><blockquote><p> &#8220;We were able to easily migrate our previously Flash dashboard to HTML5 and are now reaching more end users on more devices.&#8221;</p></blockquote><p><a href="http://wijmo.com/wp-content/uploads/2012/02/SectionWorkspace.png"><img src="http://wijmo.com/wp-content/uploads/2012/02/SectionWorkspace-300x266.png" alt="" title="Section Workspace" width="300" height="266" class="alignleft size-medium wp-image-1492" /></a>Schoolwires has end users working with their software from many different devices and computers. The powerful dashboards in Centricity2 need to work in every browser and on any device. Previously they had used Flash charts to create their interactive dashboard, but with Flash being limited to desktops, it was no longer an option. Schoolwires turned to Wijmo charts to get rich, interactive features and still work on mobile devices and older browsers.</p><p>Jason Coudriet, Vice President of Product Design &#038; Innovation at Schoolwires, stated, “I was really impressed with how the charts rendered identically in IE6 as they did in Chrome and Firefox.” He added, “We were able to easily migrate our previously Flash dashboard to HTML5 and are now reaching more end users on more devices.”</p><p><a href="http://wijmo.com/wp-content/uploads/2012/02/SiteStatistics-.png"><img src="http://wijmo.com/wp-content/uploads/2012/02/SiteStatistics--300x223.png" alt="" title="Site Statistics" width="300" height="223" class="alignleft size-medium wp-image-1494" /></a>Over the next 6 months, Schoolwires completed their migration to Wijmo. The project was completed twice as quickly as they had expected. “The Wijmo widgets are so robust and offer capabilities beyond what we could cover with our bandwidth,” said Coudriet.</p><p>“The benefits were obvious quickly,” Coudriet added. Schoolwires realized an overall efficiency gain having one library and estimate they saved hundreds of hours given that Wijmo reduced the effort of building, maintaining and customizing, and the complexities involved in the system. In addition to the time savings, Schoolwires was able to agilely build and release market-needed enhancements.</p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/schoolwires-finds-success-with-html5-widgets-from-wijmo/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Using Wijmo with WebSockets</title><link>http://wijmo.com/using-wijmo-with-websockets/</link> <comments>http://wijmo.com/using-wijmo-with-websockets/#comments</comments> <pubDate>Thu, 12 Jan 2012 16:46:01 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[ASP.NET MVC]]></category> <category><![CDATA[Showcase]]></category> <category><![CDATA[Video]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[WebSockets]]></category> <category><![CDATA[Wijmo]]></category> <category><![CDATA[XSockets]]></category><guid isPermaLink="false">http://wijmo.com/?p=1427</guid> <description><![CDATA[There are a couple of crazy guys in Sweden doing some very cool stuff with Wijmo. Meet Uffe Björklund and Magnus Thor, the master minds behind a new WebSockets library called XSockets. They are really passionate about building real-time web applications and have turned their passion into tools and samples for the community. Their WebSockets [...]]]></description> <content:encoded><![CDATA[<p>There are a couple of crazy guys in Sweden doing some very cool stuff with Wijmo. Meet <a href="https://twitter.com/#!/ulfbjo">Uffe Björklund</a> and <a href="https://twitter.com/#!/dathor">Magnus Thor</a>, the master minds behind a new WebSockets library called <a href="http://xsockets.net/">XSockets</a>. They are really passionate about building real-time web applications and have turned their passion into tools and samples for the community. Their WebSockets library is for .NET applications and has HTML5 shims for browsers that do not yet support WebSockets. These guys are doing things in Web development that is what the future of the Web will be: real-time. Not to mention the insanely cool stuff they are doing with the Kinect.</p><p>Uffe was looking for a UI tool that would compliment the XSockets streaming API. He needed something in JavaScript that could respond to live changes in data as they happened in real-time from the server. Needless to say, he found Wijmo. Since then he and Magnus have built some of the coolest apps I have ever seen with Wijmo. Here are some of the amazing things they are doing with WebSockets and Wijmo.</p><h3><a href="http://average-uffe.blogspot.com/2011/09/little-teaser-about-our-codecamp-309.html">XSockets.Net and Wijmo in a realtime voting webbapp</a></h3><blockquote><p>A short demo (built on xsockets.net and wijmo) showing a simple voting webbapp in realtime.</p></blockquote><p><iframe width="560" height="315" src="http://www.youtube.com/embed/Rpo8iEGtS0M?rel=0" frameborder="0" allowfullscreen></iframe></p><h3><a href="http://average-uffe.blogspot.com/2011/09/addicted-to-wijmo.html">XSockets Wijmo Powershell CPU Load</a></h3><blockquote><p>A realtime CPU-monitor on xsockets and wijmo&#8230; With powershell as datasupplier.</p></blockquote><p><iframe width="560" height="315" src="http://www.youtube.com/embed/pwsmdQChNZ0?rel=0" frameborder="0" allowfullscreen></iframe></p><h3><a href="http://average-uffe.blogspot.com/2011/09/realtime-voting-by-voice-recognition.html">Realtime voting by voice recognition with Kinect/XSockets/Wijmo</a></h3><blockquote><p>A realtime voice voting webapplication with kinect, xsockets and wijmo.<br /> With just a few lines of extra code you can send your voice recognition over the web with websocket thanks to XSockets.net</p></blockquote><p><iframe width="560" height="315" src="http://www.youtube.com/embed/KDlduZ4gjZQ?rel=0" frameborder="0" allowfullscreen></iframe></p><h3><a href="http://average-uffe.blogspot.com/2011/11/jquerymobile-demo.html">jQueryMobile MVC3 XSockets &#038; Wijmo</a></h3><blockquote><p>A Demo on a JQueryMobile Application built on Cornerstone T363 course. Uses MVC3, EF Code First, JQuery/JQueryMobile, XSockets and Wijmo</p></blockquote><p><iframe width="560" height="315" src="http://www.youtube.com/embed/wklnmuDUinE?rel=0" frameborder="0" allowfullscreen></iframe></p><h3>XSockets.NET Wijmo Carousel</h3><blockquote><p>Another demo with the amazing Wijmo. This time we extend the wijmo carousel to be realtime including HTML5 drag and drop for adding images in realtime.</p></blockquote><p><iframe width="560" height="315" src="http://www.youtube.com/embed/Rm1JqXJVQrE?rel=0" frameborder="0" allowfullscreen></iframe></p><h2>About XSockets</h2><p><a href="http://xsockets.net/">XSockets</a> is a .NET library for building real-time Web apps using WebSocket technology. Learn more about XSockets from <a href="http://xsockets.net/">their website</a>:</p><blockquote><p>Welcome to XSockets.NET &#8211; We give you a great possibility to build and test WebSockets on the Microsoft.NET plattform.</p><p>By just adding our free framework XSockets.NET to your WebbApp you can build realtime web-applications using powerfull WebSockets technology.</p><p>Start your Real Time Web Experience by using Sockets &#8211; In a few mintes you will be ready to develop next-gen of websites!</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/using-wijmo-with-websockets/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Wijmo Charts in Windows 8</title><link>http://wijmo.com/wijmo-charts-in-windows-8/</link> <comments>http://wijmo.com/wijmo-charts-in-windows-8/#comments</comments> <pubDate>Wed, 14 Sep 2011 20:47:18 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Sample]]></category> <category><![CDATA[Showcase]]></category><guid isPermaLink="false">http://wijmo.com/?p=1209</guid> <description><![CDATA[Yesterday was the big Windows 8 announcement we have all been waiting for. The team and I are here at the Build conference to see it first hand. Last night they gave us tablets pre-loaded with Windows 8 Developer Preview and Visual Studio 11 Preview. The biggest announcement to me was that we can now [...]]]></description> <content:encoded><![CDATA[<p>Yesterday was the big Windows 8 announcement we have all been waiting for. The team and I are here at the Build conference to see it first hand. Last night they gave us tablets pre-loaded with Windows 8 Developer Preview and Visual Studio 11 Preview.</p><p>The biggest announcement to me was that we can now use HTML, JavaScript and CSS to build Windows applications. The new Metro-style or &#8220;immersive&#8221; apps are built using these technologies. As a Web Developer, I couldn&#8217;t be happier to hear that news.</p><p>So of course instead of going out drinking with my fellow GitHubbers last night, I went to the hotel room with John Ayers and started developing.</p><p>As you know, we have a JavaScript UI library called Wijmo. I wanted to get our Wijmo Charts rendering in a Metro UI application on Windows 8. So last night, I did. Here is how&#8230;</p><h3>File -&gt; New Project</h3><div id="attachment_1211" class="wp-caption alignnone" style="width: 310px"><a href="http://wijmo.com/wp-content/uploads/2011/09/windialog1.png"><img class="size-medium wp-image-1211" title="JavaScript Project Templates in Visual Studio" src="http://wijmo.com/wp-content/uploads/2011/09/windialog1-300x182.png" alt="" width="300" height="182" /></a><p class="wp-caption-text">JavaScript Project Templates in Visual Studio</p></div><p>Yesterday, when I saw a JavaScript category in the Visual Studio Project Templates I thought I was dreaming! We will be using the Navigation Application template.</p><h3>Default Project Template</h3><div id="attachment_1212" class="wp-caption alignnone" style="width: 310px"><a href="http://wijmo.com/wp-content/uploads/2011/09/winstartproject.png"><img class="size-medium wp-image-1212" title="Default Project Template for Win8 App" src="http://wijmo.com/wp-content/uploads/2011/09/winstartproject-300x168.png" alt="" width="300" height="168" /></a><p class="wp-caption-text">Default Project Template for Win8 App</p></div><p>And here is the awesomeness that loads into VS when the project opens. If you are a Web Developer this stuff could not be more familiar. So freaking simple: couple HTML, CSS and JavaScript files. That is it! No magic unicorns behind a curtain.</p><h3>Adding Some Hot Sauce</h3><p>I want to utilize our Wijmo Charts in a Windows 8 app so I need to bring in the scripts for it and it&#8217;s dependencies. Mainly we need jQuery, jQuery UI, Raphael and Wijmo. Now there is a lot of unnecessary code in these libraries that could be ripped out later. Lets just use these libraries as is since we know how to use them and know they are stable.</p><div id="attachment_1213" class="wp-caption alignnone" style="width: 222px"><a href="http://wijmo.com/wp-content/uploads/2011/09/winjsfilessm.png"><img class="size-medium wp-image-1213" title="Adding Wijmo and jQuery files to Project" src="http://wijmo.com/wp-content/uploads/2011/09/winjsfilessm-212x300.png" alt="" width="212" height="300" /></a><p class="wp-caption-text">Adding Wijmo and jQuery files to Project</p></div><p>The files have to be packaged with the application so CDN is not usable in this scenario. Makes sense.</p><h3>Adding Script References</h3><p>In the project, open up default.html. It already has other scripts referenced for the Metro UI framework. Take a minute to check those out. It is really cool that the source files are included for the framework too. If you&#8217;re interested you can take a quick look under the hood. Just your standard JavaScript files so don&#8217;t be scared.</p><p>In default.html I add the following references:</p><pre>&lt;script src="/js/wijmo/external/jquery-1.6.2.min.js" type="text/javascript"&gt;&lt;/script&gt;   
&lt;script src="/js/wijmo/external/jquery-ui-1.8.16.custom.min.js" type="text/javascript"&gt;&lt;/script&gt;   
&lt;script src="/js/wijmo/external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"&gt;&lt;/script&gt;   
&lt;script src="/js/wijmo/external/jquery.mousewheel.min.js" type="text/javascript"&gt;&lt;/script&gt;   
&lt;script src="/js/wijmo/external/jquery.glob.min.js" type="text/javascript"&gt;&lt;/script&gt;   
&lt;script src="/js/wijmo/external/raphael.js" type="text/javascript"&gt;&lt;/script&gt;   
&lt;script src="/js/wijmo/jquery.wijmo-open.1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;   
&lt;script src="/js/wijmo/jquery.wijmo-complete.1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;</pre><h3>Start Programming</h3><p>Now that we have the resources included in our app we can start programming the interface. Since this is a Navigation Application it loads separate files in as fragments into default.html. There is already a page in the project and wired up to load initially called homePage.html located in the html folder. We just need to add a div tag to use as our charting canvas. This will be initialized as a widget at runtime using JavaScript.</p><pre>&lt;div id="wijpiechart" class=""&gt;           
&lt;/div&gt;</pre><p>There is a JavaScript file that compliments the HTML file we are working on called homePage.js located in the js folder. It is essentially the &#8220;code behind&#8221; for the HTML page. Inside you will see that it has some initialization code. We will add ours to the .when() promise that is fired when the homePage.html is loaded. Here is what that code looks like. I will include the entire function to be more clear.</p><pre>    function fragmentLoad(elements, options) {
        WinJS.UI.processAll(elements)
            .then(function () {
            // TODO: Initialize the fragment here.
            $("#wijpiechart").wijpiechart({
                height: 600,
                width: 1024,
                seriesList: [{
                    label: "c#",
                    data: 215517
                },
                {
                    label: "java",
                    data: 157301
                },
                {
                    label: "php",
                    data: 145929
                }],
                textStyle: { fill: "#ffffff", "font-family": "Segoe UI Semilight", "font-size": "20pt", stroke: "none" },
                chartLabelStyle: { fill: "#242122", "font-family": "Segoe UI Semilight", "font-size": "20pt", stroke: "none" },
                hint: {
                    contentStyle: { "font-family": "Segoe UI Semilight", "font-size": "24pt", stroke: "none" },
                    content: function () {
                        return this.data.label + " : " + $.format(this.value / this.total, "p2");
                    }
                },
                header: {
                    visible: false
                },
                legend: {visible:false},
                seriesStyles: [{
                    fill: "180-rgb(255,15,3)-rgb(212,10,0)", stroke: "#FFFFFF", "stroke-width": "2"
                }, {
                    fill: "90-rgb(255,102,0)-rgb(255,117,25)", stroke: "#FFFFFF", "stroke-width": "2"
                }, {
                    fill: "90-rgb(255,158,1)-rgb(255,177,53)", stroke: "#FFFFFF", "stroke-width": "2"
                }]
             });
        });
    }</pre><p>I only put 3 slices in the seriesList to make this more concise. The data is also hard coded and not data bound. I will save that for a later post.</p><h3>Fast &amp; Fluid</h3><p>That&#8217;s it. Hit F5 and you have an immersive Metro application that is fast and responsive and alive with activity (sorry, I couldn&#8217;t resist). Our interactive SVG chart render beautifully in the Metro app and it could not be easier to implement them. If you are a Web Developer like myself you can make a Windows 8 app.</p><div id="attachment_1219" class="wp-caption alignnone" style="width: 310px"><a href="http://wijmo.com/wp-content/uploads/2011/09/winapp.png"><img class="size-medium wp-image-1219" title="Wijmo Charts in a Windows 8 Metro App" src="http://wijmo.com/wp-content/uploads/2011/09/winapp-300x168.png" alt="" width="300" height="168" /></a><p class="wp-caption-text">Wijmo Charts in a Windows 8 Metro App</p></div><h3>Fork It</h3><p>I just pushed this source code to GitHub. Feel free to download it, fork it and have some fun! <a href="https://github.com/banzor/Wijmo-in-Windows-8">https://github.com/banzor/Wijmo-in-Windows-8</a></p> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/wijmo-charts-in-windows-8/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Spotlight: Red Tiki at SXSW</title><link>http://wijmo.com/spotlight-red-tiki-at-sxsw/</link> <comments>http://wijmo.com/spotlight-red-tiki-at-sxsw/#comments</comments> <pubDate>Tue, 15 Mar 2011 18:58:46 +0000</pubDate> <dc:creator>Chris Bannon</dc:creator> <category><![CDATA[Showcase]]></category> <category><![CDATA[Video]]></category><guid isPermaLink="false">http://wijmo.com/?p=1080</guid> <description><![CDATA[We sat down to interview Cam Worth of Red Tiki at South by Southwest Interactive. Cam has been using Wijmo to enhance CMS systems with Grids and Charts. He has a lot to say about his experience with using Wijmo. His company Red Tiki is at SXSW Interactive because they are finalists in the South [...]]]></description> <content:encoded><![CDATA[<p><a href="http://www.redtiki.com.au/"><img class="alignnone size-full wp-image-1081" title="Red Tiki is a SXSW Finalist!" src="http://wijmo.com/wp-content/uploads/2011/03/sxsw1.jpg" alt="Red Tiki is a SXSW Finalist!" width="560" height="316" /></a></p><p>We sat down to interview Cam Worth of Red Tiki at South by Southwest Interactive. Cam has been using Wijmo to enhance CMS systems with Grids and Charts. He has a lot to say about his experience with using Wijmo. His company Red Tiki is at SXSW Interactive because they are finalists in the South by Southwest Interactive Web Awards!</p><h3>Video</h3><p><iframe src="http://player.vimeo.com/video/20995645?portrait=0" width="600" height="338" frameborder="0"></iframe></p><h3>About Red Tiki</h3><p>Red Tiki is a team of experienced design professionals working together for the love of the web and animation.</p><ul><li> Website: <a href="http://www.redtiki.com.au/">http://www.redtiki.com.au/</a></li><li> Twitter: <a href="http://www.twitter.com/RedTikiKing">@RedTikiKing</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://wijmo.com/spotlight-red-tiki-at-sxsw/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Served from: wijmo.com @ 2013-05-22 18:56:47 by W3 Total Cache -->