Today a donut, tomorrow the world! Another adventure in D3

Earlier I succeeded, finally, in making a donut. Before I trust my own data, I’m adamant to make something pretty – the first tut’s example (thanks Mike Bostock!), to be precise. This has to do with figuring out the deal with commas.

WTF. So confused.

Meh, screw it. I tried another example on the Gallery instead – the collision detection example.

Which worked, yay, but isn’t wobbly and interactive. ARGH. OK. focus. This is not the end point. Baby steps. Grf.

Because I'm procrastinating and not motivated enough to solve issues, I'm trying a few more... hmm, I think part of my problem is the source file link (where the data and relationships live). And then I'm probably missing some other files for the fancy stuff.

Next day: So this guy on stackoverflow "hasn't had much success with wp-d3" which is a pity, but maybe it's utility is good yet limited. Using an iframe and/or pageview may work. Alternatively/in addition using a csv file to import the data may be a good idea too, according to this cool post learning like I am 🙂 (And I am TOTES going to visualise my annual calendar like this!)

Next day: let's try the csv format first, with my work (which may be broken in other ways...)

Nope.

OK, pageview time. In the format *square bracket* pageview url="url" title="title" *square bracket*

First, trying the sneaky steal the webpage directly (which won't work for my own work, obviously, unless I host it somewhere else which sortof defeats the point), using the cool collision example again.

Title: collision detection

OK, it works, ish.  I'm not too bothered by the size of the frame right now, but this could become an issue with my stuff. A 'doland' on the pageview comments said something about a $height = ‘800px’; but not sure where to go put that. Anyways, a problem for later.

Let's try the collision example saved as a html on my wordpress site next.

It didn't work, but it did read the file (it showed the hint text). I think the problem is that the html asks for the D3 files d3/d3.js, d3/d3.geom.js and d3/d3.layout.js. So time to find those and load them locally and link them, hopefully, properly. (Ugh, this means loading up a new html file every time, yuck. Maybe I'll try this into the d3 plugin again? except that only takes the script bit and this is before that, not sure how to handle that yet - dedicated folder locally something somethinged? Rooted?).

Nope, nadda. Not even hint text. Let's go back to the donut.

Nope. OK, so this example is fairly simple so I think this is a file finding problem. Also, tomorrow's problem.

Title: donut revisited

One Reply to “Today a donut, tomorrow the world! Another adventure in D3”

Leave a Reply

Your email address will not be published. Required fields are marked *