On Tue, Jan 17, 2012 at 6:42 PM, John Lenz <span dir="ltr">&lt;<a href="mailto:lenz@math.uic.edu">lenz@math.uic.edu</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
HTML5 Canvas is great for charts.  If you go this route you might as well use a library which draws charts for you instead of writing all this code yourself.<br>
<br>
Personally, I use extjs version 4 which has some amazing charts, but there are other libraries out there.<br>
<br>
<a href="http://www.sencha.com/products/extjs/examples/#sample-3" target="_blank">http://www.sencha.com/<u></u>products/extjs/examples/#<u></u>sample-3</a><br>
<br>
Essentially the server provides the data in JSON or XML some other format, and the extjs code draws the charts on the client side.<br>
<br>
If you go with extjs, then the server side I would suggest a small, simple yesod or snap server.   You could probably get the server under a hundred lines of code with yesod; see some of the examples in the yesod book.  yesod or snap would serve JSON of the statistics on request, and also serve the javascript files which draw the charts.<br>

</blockquote></div><br>Yes, I was thinking about using Haskell to generate everything that specific Javascript library needs to display charts in browser. Naturally charts are to be displayed by this library itself. I also would like to have Haskell tools to generate Web GUI in Javascript.<br>
As for yesod, I am not sure that I like approach which mixes HTML with code, or even worse - creates a new weird HTML-like language like  &#39;whamlet quasi-quotation&#39;, for example:<br><pre class="codeblock"><pre style="padding:0;margin:0">
<span style="color:blue">&lt;!-- &lt;a</span> <span style="color:green;font-weight:bold">href</span>=@{Page<span style="color:teal">1</span>R}<span style="color:blue">&gt;</span>Go to page 1! --&gt;</pre></pre>I prefer using Turing complete PL to program web client, like the one used in GWT (Java) or Cappuccino  (Objective-J). <a href="http://cappuccino.org/learn/">http://cappuccino.org/learn/</a><br>
In this case you /almost/ don&#39;t need to know  HTML, CSS, DOM, Ajax, etc. to develop WebUI and good PL lets you concentrate on problem domain instead of bothering about browser support.<br>It is a real pity that Haskell still has no such tools to generate Web GUI in Javascript. (((<br>
<br>