Charts, Charts, Charts!

This week we’re moving beyond the maps and into (soon to be) charted territory. We’ve chosen to play around with XCharts, which is a javascript library for what else — charts — that works alongside the d3 library. Though we’re not sure how deep we’ll be able to delve into the scripts, I think it will be a good starting off point. It took a few hours to figure out how things are set up and the basics of manipulating the style, which was hindered by a few errors on XChart’s quick startup instructions page. I had to do some “Google mining” to find out that XCharts is still incompatible with d3’s newest version 3, which XCharts fails to mention on their page. Linking to d3.v2.min.js instead of d3.v3 seemed to do the trick; though I must admit that at this stage in my skill level, most of my successes are pretty much based on luck and trying what seems to be the same thing over and over đŸ˜‰Â Another frustrating thing is that their documentation and examples pages are honestly not really that helpful unless you know quite a bit about javascript. It’s all a little over the heads of us at the field school, which is why we’ve chosen to all work on these charts at the same time so we can figure it out together.

So far I’m happy with the look and the basic data of XCharts, but trying to overlay multiple series and to implement background “time periods” with rectangles is proving frustrating. Also, the need to input the data array into the html document directly is pretty time-consuming. We’ll see how they all turn out in the end. Since we have a lot of data spread out over the 20th century, most of our charts will be line graphs, but we also have a few subject graphs that we’ll be experimenting to see what we can make that will best represent the data we have. We may have to leave XCharts and turn to another tool for those if we don’t like how things turn out. This seems to be the testing phase of the project as we try to uncover the best visualization we can build.

Leave a Reply