Flex Data Visualization component source is available

I had been working w/ the Flex beta (where you couldn’t get at the source) for so long, I just gave up. But, you can get at the charting component source if you buy Flex Builder Pro. Not open source, but, all I want to do is override methods. (via Pearls of Flex)

Google Data Viz API

Google has released a data visualization API. Some of it is Flash - specifically the code they got when they purchased Gap Minder.

Update: Infosthetics has a good post about this as well.

WordPress Upgrade

I upgraded to the latest version of WordPress and changed the theme of the blog as well. It now works well enough that I can stop editing and spend time w/ my family. There will be incremental updates over the next week or so. Hopefully RSS works. It appears Categories are screwed up. I need some green in the theme. That said, I was using WordPress 1.5 and the upgrade to 2.3.3 is pretty great.
And contact page doesn’t work yet.
And that search button looks stupid.

Mississippi Primary

I’ve finally found a way to blog regularly - update primary data. Mississippi data added to the Election Dashboard.

Flex Multiline Button

Posting mostly so I can find this again quickly.

Basically stolen straight from Alex’s Flex Closet, but a button (not radio button), fixed casting, and just included the referenced class in the same file (less flexible, but, more convenient, maybe). Anyway - use just like a button but has multiple lines.

package components.multiLineButton
{
import flash.display.DisplayObject;
import flash.text.TextLineMetrics;

import mx.controls.Button;
import mx.core.IFlexDisplayObject;
import mx.core.mx_internal;
use namespace mx_internal;

public class MultiLineButton extends Button
{
public function MultiLineButton()
{
super();
}

override protected function createChildren():void
{
if (!textField)
{
textField = new NoTruncationUITextField();
textField.styleName = this;
addChild(DisplayObject(textField));
}

super.createChildren();

textField.multiline = true;
textField.wordWrap = true;
textField.width = width;
}

override protected function measure():void
{
if (!isNaN(explicitWidth))
{
var tempIcon:IFlexDisplayObject = getCurrentIcon();
var w:Number = explicitWidth;
if (tempIcon)
w -= tempIcon.width + getStyle("horizontalGap") + getStyle("paddingLeft") + getStyle("paddingRight");
textField.width = w;
}
super.measure();

}

override public function measureText(s:String):TextLineMetrics
{
textField.text = s;
var lineMetrics:TextLineMetrics = textField.getLineMetrics(0);
lineMetrics.width = textField.textWidth + 4;
lineMetrics.height = textField.textHeight + 4;
return lineMetrics;
}
}
}
import mx.core.UITextField;

class NoTruncationUITextField extends UITextField
{
public function NoTruncationUITextField()
{
super();
}
override public function truncateToFit(s:String = null):Boolean
{
return false;
}

}

Election Center Update

It’s worth doing political charts just to have titles like “Election Center Update”. Obama won Wyoming and Mississippi is tomorrow. Anyway, I just added a delegate count comparison page, here.

Election Update

Entered the latest state info from CNN. Again, I can’t figure this data out: Is it wrong? (state totals don’t add up to overall totals) Is it sloppy? (Texas 12 superdelegates, but, 12 to Clinton and 9 to Obama) Well, it’s updated anyway. I changed the colors a bit - don’t love them, but, at least Clinton and Obama colors are consistent.

Also - the source is a mess, but, if anyone’s interested - here’s the xml file adn the xsd. If you make a chart, please send me an email.

Dashboard here.

Election Dashboard

Combination of being annoyed that I couldn’t find the data I wanted on-line and playing around w/ Flex 3 Charting, led to this.

Still very incomplete, but, figured I should post in case Obama wins Texas and no one cares about delegate counts any more.