{"id":97,"date":"2008-08-20T10:00:13","date_gmt":"2008-08-20T14:00:13","guid":{"rendered":"http:\/\/ryepup.unwashedmeme.com\/blog\/?p=97"},"modified":"2008-08-20T10:00:13","modified_gmt":"2008-08-20T14:00:13","slug":"adw-charting-progress-and-plans","status":"publish","type":"post","link":"http:\/\/ryepup.unwashedmeme.com\/blog\/2008\/08\/20\/adw-charting-progress-and-plans\/","title":{"rendered":"adw-charting progress and plans"},"content":{"rendered":"<p>It&#8217;s been awhile since I posted any updates on <a href=\"http:\/\/common-lisp.net\/project\/adw-charting\/\">adw-charting<\/a>, but some progress has been made.\u00c2\u00a0 After deciding to <a href=\"http:\/\/ryepup.unwashedmeme.com\/blog\/2008\/04\/05\/adw-charting-to-get-a-lot-prettier\/\">use google charts for rendering<\/a>, a few months ago, I&#8217;m re-thinking the decision.\u00c2\u00a0 Google charts look very nice, but they weren&#8217;t as automatic as I&#8217;d hoped, and there was still a lot of processing needed before it could display a reasonable chart either.\u00c2\u00a0 Using google is certainly less CPU\/memory intensive than using vecto, but there are a few problems:<\/p>\n<ul>\n<li>charts are limited to 300,000 pixels, which is smaller than it sounds<\/li>\n<li>because all the data needs to be passed on a URL, it chokes on large datasets.\u00c2\u00a0 This can be helped by using <a href=\"http:\/\/code.google.com\/apis\/chart\/#chart_data\">alternate encodings<\/a> for values, but that looks like a pain in the ass (basically have to map the arbitrary lisp data evenly onto 0-64 or 0-4096, then encode as ASCII, I predict rounding troubles)<\/li>\n<li>it doesn&#8217;t automatically scale to fit your size.\u00c2\u00a0 For example, a bar chart uses 20px wide bars by default.\u00c2\u00a0 If you have too many bars they just wander off the right of the canvas, and you need to manually adjust the bar width to get things to fit<\/li>\n<li>some of the labels \/ titles get cut off<\/li>\n<\/ul>\n<p>The google backend certainly has it&#8217;s uses, but I&#8217;m going to revive the <a href=\"http:\/\/www.xach.com\/lisp\/vecto\/\">vecto<\/a> backend, which gives complete control.\u00c2\u00a0 As a start, I&#8217;ve split the project into a 3 asdf systems:<\/p>\n<ul>\n<li>adw-charting: has some utils and common code, declares the :adw-charting package<\/li>\n<li>adw-charting-vecto: adds\/exports functions for making vecto charts in the :adw-charting package<\/li>\n<li>adw-charting-google: adds\/exports functions for making google chart URLs into in the :adw-charting package<\/li>\n<\/ul>\n<p>In this setup, you&#8217;ll load adw-charting-google.asd or adw-charting-vecto.asd, and then all the dependancies will sort themselves out, and you don&#8217;t have anything loaded you don&#8217;t need.<\/p>\n<p>I looked at <a href=\"http:\/\/common-lisp.net\/project\/cl-containers\/asdf-system-connections\/\">asdf-system-connections<\/a> but didn&#8217;t see how it would help, so copied <a href=\"http:\/\/common-lisp.net\/project\/cl-xmpp\/\">cl-xmpp<\/a>&#8216;s multiple asd file scheme.\u00c2\u00a0 This is currently just in the darcs repo, and may have some bugs.<\/p>\n<p>I&#8217;ve also started an actual <a href=\"http:\/\/common-lisp.net\/project\/adw-charting\/todo.html\">adw-charting todo list<\/a>, as part of a greater effort to be more organized in my life, comments welcome here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been awhile since I posted any updates on adw-charting, but some progress has been made.\u00c2\u00a0 After deciding to use google charts for rendering, a few months ago, I&#8217;m re-thinking the decision.\u00c2\u00a0 Google charts look very nice, but they weren&#8217;t as automatic as I&#8217;d hoped, and there was still a lot of processing needed before [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,15,16],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-adw-charting","category-lisp","category-vecto"],"_links":{"self":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":0,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"wp:attachment":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}