Raster image of my SVG web statistics

Ok, I finally got around to updating my SVG web statistics, a little over a month since I first posted them. Many thanks to Johan, Rob and Jonathan for handy code and suggestions. I hope you like it. It's located at the same place as before.

I've added some drag interactivity to it. At this time it is quite responsive in IE+ASV, but less so in other implementations (Firefox 1.5 and Opera 9 TP2). Dragging using my library is slightly slower than it used to be because, in order to get "slider" dragging, I had to add constraints to each draggable entity (so that you can't freeform move it around the page). This adds conditional checking every time the entity is dragged, but I see no way around this. Hopefully smart guys like Johan will take a look at my JS and show me the idiocy of my ways. 😉

CLICK HERE TO LOOK AT MY SVG WEB STATS

§231 · February 20, 2006 · JavaScript, RIA, Software, SVG, Technology, Web · · [Print]

Leave a Comment to “Pretty Web Statistics Version 2”

  1. Really nice dragging feature! It’s also good to see the additional code cleanups; even with the pseudo-css (which I think was only needed for Opera 8.5; IIRC, the TP releases of Opera 9 have sorted out that now) “bloat”. Almost as pretty behind the scenes now as in plain view. 😉

    When you encounter array-lookalikes (such as the unwieldy DOM NodeSets) you want to convert to proper Array objects, you can always use Array.prototype.slice to good effect.

    And if you want to, you could substitute all the zeroes in webstats-data for just the trailing comma to save some space. When indexing a value-less position in the array, you will get the undefined value back. Change the accessor code to read “BrowserData[browser][day]||0” instead of plain “BrowserData[browser][day]”, like the other bits you imported back from my version that did the same.

    Besides that, I don’t have much feedback about things at present, but I might take another peek into the constraints code, if that’s where your hot spots show up in profiling.

  2. I had this problem a while back too, and unfortunately its been nagging me even after a computer crash and recovery. I can’t see SVG stuff in my Firefox. What I do see is this –>

    Could you please tell me what I’m doing wrong, or what do you think is wrong?

    [Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1]

  3. Umm… the picture didn’t show up … the link is here … [http://photos1.blogger.com/blogger/6491/532/320/svg_trouble.jpg]

  4. Jeff Schiller says:

    @Johan: Thanks for the suggestions and links. I’m going to put this project on the back-burner for a little while but when I take it up again I’ll look into the array slicing and removing the zero’s from the arrays. I haven’t officially profiled yet, btw…

    @Aditya: That looks odd – I’m seeing the green “help” button but nothing else (meaning SVG is trying to be rendered). I’m wondering if it has to do with script settings. Note that this demo requires JavaScript to be running. Anyone else encounter this problem?