Announcement

Collapse
No announcement yet.

Possible to draw counting Numbers for each circle in LinearRegressionCalc.efs?

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

  • Possible to draw counting Numbers for each circle in LinearRegressionCalc.efs?

    Hi- I am wondering if it is possible to draw numbers by each circle , in the study"LinearRegressionCalc.efs", to numerically identify each circle in the length. Thanks.
    Diane

  • #2
    Hello Diane,

    Yes, use drawTextRelative() after the drawShapeRelative() calls and use the same barIndex/yValue inputs. For the text input, use the i variable from the for loop and 0 for the other call that appears a few lines below the loop.
    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


    • #3
      Hi Jason--Thanks again for your help. Guess I'll stop making promises I can't keep. I input the following for the 1st item:
      drawTextRelative(-i,aY[i],"i=1",Color.red,null,Text|CENTER,"Arial",10); I get an error saying"CENTER is not defined". If I leave it out, I get an error saying not enough arguments.
      Diane

      Comment


      • #4
        Hello Diane,

        Replace "i=1" with just i. Use the variable by itself and not as a string. This will draw the actual number used in the for loop for the text in the label.


        Replace Text|CENTER with Text.CENTER. The pipe (i.e. | ) character is used to apply multiple text flags by separating them with this character. "Text" and "CENTER" by themselves are not valid flags, which is why you're getting the error message. See the reference link I posted in my previous reply for the available text flags.

        Also you need to add the tag name parameter as the last parameter just like the drawShape calls.
        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


        • #5
          Jason, this is getting me off to a great start. However, I was thinking more in terms of a consecutive count. For example, in a length of, say, 10, I wanted to count the 1st 10 circles as they appear by showing #1 by the 1st circle, #2 by the 2nd circle, etc. Then when the 11th circle showed up, I wanted to start the count over again with #1 by the 11th circle, #2 by the 12th circle, etc. I hope this is not too confusing. Is this possible? Thanks for your patience.
          Diane

          Comment


          • #6
            Hello Diane,

            To reverse the order of the numbers drawn on the chart, replace i with (nLength+1) - i for the text parameter.
            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


            • #7
              Jason,
              That did it!!!!! Thank you again for your incredible expertise!
              Diane

              Comment

              Working...
              X