<?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>Webdevelopment at huuah.com &#187; flot</title>
	<atom:link href="http://huuah.com/tag/flot/feed/" rel="self" type="application/rss+xml" />
	<link>http://huuah.com</link>
	<description>webdevelopment, cms, php, javascript etc</description>
	<lastBuildDate>Sun, 20 Nov 2011 20:30:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>jQuery and Flot demo</title>
		<link>http://huuah.com/jquery-and-flot-demo/</link>
		<comments>http://huuah.com/jquery-and-flot-demo/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:24:28 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[flot]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=147</guid>
		<description><![CDATA[<p>I previously posted some info about plotting data with jQuery and Flot and I have now set up a small demonstration:</p>
<p>The data value below are 100% random generated numbers, but they will simulate data from a database (or anything else for that matter). It consists of an array, where&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I previously posted some info about plotting data with jQuery and Flot and I have now set up a small demonstration:</p>
<p>The data value below are 100% random generated numbers, but they will simulate data from a database (or anything else for that matter). It consists of an array, where the first parameter the a Unix timestamp (multiplied by 1000) and the second parameter is the value to be drawed.<br />
<textarea id="randomnumber" rows="10" cols="50"></textarea><br />
<button id="generaterandomnumbers">Generate a list of numbers</button><br />
Push the generate button to get a new dataset.</p>
<p>You can also try to change some of the values, to see that happens. Just push the update button below, to have your changes updated.<br />
<button id="draw">Update graph if values has changed</button></p>
<p>The graph:</p>
<div id="livejquery"></div>
<p>The code to output the graph is:</p>
<pre class="brush: plain; title: ; notranslate">
        var options = {
            xaxis: {
                mode: &quot;time&quot;,
                timeformat: &quot;%y/%m/%d %h:%M&quot;
            },
            lines: {
                show: true,
            },
        };

        var data = [];
        data = eval($(&quot;#randomnumber&quot;).val());
        $.plot($(&quot;#livejquery&quot;), data, options);
</pre>
<p>I have set a few options (goto the Flot API for futher options) &#8211; the xasis should convert the unix timestamp to a human readable format and the graph should output a <em>line</em>. I am only using the eval()-function because I have to convert the string input from the textarea (class #randomnumber) to an array. </p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/jquery-and-flot-demo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

