Search code examples
apache-flexflashactionscriptflex-charting

With a Flex ColumnChart, is there a way to center the datatip over the column


I'm using a Flex ColumnChart with a custom dataTipRenderer. I'm able to apply a nice skin with the dataTipRenderer, but am not sure how to move the datatip to be centered.

Is there a way to have the chart center the data tips over the column instead of the normal top-right alignment the chart does?

Instead of:

      |tip text|
    +++
    +++
    +++
    +++
    +++
    +++
    +++
    +++

I want:

| tip text |
    +++
    +++
    +++
    +++
    +++
    +++
    +++
    +++

Any ideas involving HitData, etc, would be welcome.


Solution

  • If you have a dataTipRenderer you can set the property x in the main component (canvas, hbox or vbox) like this: x="this.x - (this.width* .5)"