Inverting an Axis on a chart

I had a case on my latest project where I had a chart that needed to not start at 0,0 as most do. Rather this chart, and the data it represented needed to have it's Y Axis inverted. The better numbers were closer to the bottom, and higher in value. 0 was bad.

I did some searching and there seemed to be one common approach. manually invert your data. I wasn't sure that was what I wanted, but it turned out that that approach worked really well.

 

in the function that creates the data for the chart, I simply invert the values by subtracting 2* the value, from itself

val.perfRank = (performance - (performance * 2));
val.availRank = (availability - (availability * 2));
val.consistRank = (consistency - (consistency * 2));

 

After populating my dataprovider with the inverted values, all I needed was a label function to undo my voodoo.

private function rankLabelFunction(labelValue:Object, previousLabelValue:Object, axis:IAxis):Number
        {
            var newAxisValue:Number = Number(labelValue);
            newAxisValue = (newAxisValue + (Math.abs(newAxisValue) * 2));   
            return newAxisValue;
        }

You'll want to make sure to do the absolute value, LOL. Otherwise you'll be like me, "Why is the negative number, even bigger? Oh yeah! Duh!" Math, not my strong suit.

There may be more elegant  ways, I sorta hope there are or will be, but this is a pretty straight forward way to simply put your lowest value at the top of your axis, which is what I needed.

Great Degrafa preso at the RMAUG last night!

I was able to make it over to The Hive last night to see Juan "the hard core super star Degrafa Guy" Sanchez present Degrafa at the RMAUG. I just made up that name, but it fits, so he's welcome to it if he likes.

Dave and company have a new home at The Hive, which is a very sweet co-working facility here in Denver.

 

Juan's session was well timed, i had spent a good chunk of the day figuring out how to skin a link button. Turned out livedocs was spot on with it's example (go figure). But after watching Juan skin a button, I was wishing we had Degrafa in the project I'm on. I did think about using it, but figured that was a decision to be discussed before I committed a whole new library of code.

So my solution, worked well enough, but the Degrafa way is killer.

In a Skin file...

<code>

<fills>
        <SolidFill
            color="#936"
            id="myFill"/>
    </fills>

    <geometry>
        <RoundedRectangleComplex
            state="upSkin"
            width="{awidth}"
            height="{aheight}"
            bottomLeftRadius="10"
            bottomRightRadius="20"
            topLeftRadius="15"
            fill="{myFill}" />
        <RoundedRectangleComplex
            state="overSkin"
            width="{awidth}"
            height="{aheight}"
            fill="{myFill}" />
    </geometry>
           
</GraphicBorderSkin>

<code>

 

There's some AS at the top, but that's the jist of stateful skinning of a button. degrafa FTW!

 

Time Machine over the network no love

I have a Seagate 250GB drive that I was using for Time Machine. Locally it was great Then Apple updated the AIR port base station. SWEET.

 

I've got two macs, a MBP and a MBA. The MBA uses a smaller 40gb drive hung off the Airport station, and backs up like a champ. I've got history back several weeks at any given time.

 

The MacBook Pro however has had zero luck! First I wasn't able to get the initial 126gb back up to complete. I read an article about starting the back up on the network, then completing it over USB to speed it up. Then reconnect to the network for all future backing up. NO LUCK.

Then I gave it a night to do a full back up over the wire, this morning it looked good. A few smaller back ups took place through out the morning.

I enter time machine, and all that is there is "now" no other days or anything. Not sure what I'm doing wrong. The MBA runs hourly, does it's thing and is done, but the MBP just won't get a good back up going. I'd rather not have to always think about ejecting a USB ext disk but may have to. WEAK

 

Long time no post

The other day my wife IM'ed me, "Your blog is broken or something." turns out, when you don't post in like 2 months, it has nothing to show.

 

It's been a busy few months; Tom and I wrapped up 360|Flex Europe, and immediately dove into 360|Flex San Jose 2008. After Milan, my wife and I spent an extra week in Italy, hitting Venice, Florence and Rome.

I got home, started a project with Esria, attended Software 2008, and now am finally enjoying being home.

My project is one challenge after another, but I'm learning a great deal, so it's almost worth it :)

Software 2008 was an experiment to see how I worked with a potential client (free trip to Vegas, can't complain) so that might bear fruit.

I was also in San Jose for a day last week, get this. Denver -> Vegas, vegas -> San Jose in the AM,  San Jose ->Vegas in the afternoon, Vegas -> Denver in the evening. That's some seriously frakked up travel. On top of that, i worked all night the night before on my project, so I didn't go to bed at all. w00t!

Aside of a trip to Japan, followed by another trip to San Jose (friend's wedding) my traveling is mostly done for a bit, I love to travel, but these past few months have been killer!

 

Tom and I have some interesting things on the horizon too, interesting enough for me to want to accelerate time a smidge to see what happens. I'm not jynxing anything by saying what's up, but I'll say this, we'll be at MAX in a bigger way than "attendee" or even "speaker" Should be really cool.

 

The other thing, well I don't even know how to make a hint about so you'll just have to wait, the same as me to find out. To quote that not very good Jim Carry movie, "How will it end?"

BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.