tags:

views:

23

answers:

1

For some reason, my text is coming out reversed (mirror image) when I put a Label component on a CartesianDataCanvas (all in actionscript). Explicitly specifying "direction" did not help. I'm wondering if backgroundElements can't handle text?

            var dataCanvas:CartesianDataCanvas = new CartesianDataCanvas();
            cachedBackground[1] = dataCanvas;
        this.backgroundElements = cachedBackground;

...

            var label:spark.components.Label = new spark.components.Label();
            label.text = dimension.name;
            label.setStyle("color", color);
            label.setStyle("fontSize", this.getStyle("fontSize") + 2);
            label.setStyle("fontWeight", "bold");
            CartesianDataCanvas(cachedBackground[1]).addDataChild(label, this.minimumDate, 0.9);
A: 

https://bugs.adobe.com/jira/browse/SDK-27054

I ran into this same issue. The workaround stated in the bug (you can see it in the FXP attached to the bug) worked for me. Basically, try putting this in your class:

private var fix:int = function ():int{invalidateProperties(); return 1}();

Hopefully that helps. It looks like 4.1 had all kinds of issues with mirroring, so hopefully 4.5 will be much better.

Alternatively, if that doesn't work downgrade to 4.0 for the time being, that should also do the trick.

Burnt