Announcement

Collapse
No announcement yet.

drawTextRelative question & comments

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • drawTextRelative question & comments

    I am trying to place text above price bars which is CENTERED on the bar. There is no (documented) Text.CENTERED flag available for drawTextRelative, and neither Text.RIGHT or Text.LEFT do what I want. Is there a trick I can use to center over the bar? If not, would the developers of version 7.2 consider adding a Text.CENTERED flag to drawTextRelative? How can I submit a request for this?

    Also please note that in the documentation for drawTextRelative in "textformularef.doc" the flags are documented as "TEXT.ONTOP" instead of "Text.ONTOP"; this is not recognized by eSignal and gave me fits until I found an example that did it correctly. This needs to be fixed in the documentation.

  • #2
    Hi Silverdad:

    I don't think you can do that because the smallest x-axis increment is 1 and each bar is painted at an x-axis increment. To center a string (e.g., > 1 character) you would need fractional x-axis increments or away to translate between pixels/chart axis. You can definitely place a single text character above/below a bar and it will align correctly but I don't think you can center a string over a bar for the reason stated above. Hopefully, I'm wrong about this

    Chris

    Comment


    • #3
      I actually want to place a single character over the bar. You mentioned that it is possible. How?

      Thanks for responding!

      Larry Robinson

      Comment


      • #4
        Hi Larry:

        I see what you are talking about now and, no, I don't have a solution that perfectly centers the character. I am using drawTextRelative() to display an "H" above the highest high in a range and the H begins at the wick. While it is fairly easy to tell which bar the H is over, you are absolutely correct in that it is not centered above the wick.

        Sorry for the confusion.

        Regards,

        Chris

        Comment

        Working...
        X