Announcement

Collapse
No announcement yet.

Creating a Text Block

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating a Text Block

    Having used the Text Tool manually to anchor a block of text to a point on the chart, I am wondering if there is an equivalent that I can use within a study to do the same thing?

    Using drawTextAbsolute() once per line seems to me to be a little too complex, and not actually quite the same since each line would be anchored to a different coordinate. This would require the developer to determine multiple X and Y values that are consistent with the scaling and/or font size. Unfortunately, it seems that distance between lines varies if scaling is altered (e.g. when price axis is dragged) unless anchored relative to LEFT and TOP/BOTTOM (not always what one would want to do).

    Also, since there is no Text.RELATIVETORIGHT option, is it possible to keep rows or columns of text located to the right of the current bar, from moving if the price or time scale is altered?

    Hope that's not too unclear.

    Assistance greatly appreciated.

    G.

  • #2
    Hello G,

    We do not have an equivalent way to recreate the Text tool through EFS. You will have to use multiple drawTextAbsolute() calls. The cx and cy parameters are used to solve the problem you have encountered in regards to spacing when the scale changes. Please read the notes on these parameters in the reference link. Experiment with these parameters to see if this will work for you. If you need some help, post your code and I'll help you see it through.

    At this time there isn't an effective way to anchor text objects relative to the right side of the chart. Please feel free to submit a request for this ability to [email protected].
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X