Announcement

Collapse
No announcement yet.

help for a beginner

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

  • help for a beginner

    Could someone tell why I am getting errors on the following code:

    If(vAvg > 1) {
    vReturnVal = 1;
    } else {
    vReturnVal = 0;
    }

    the reported error is: "missing ; before { on line 1"
    If I put a ; there it changes to a syntax error on the "else" line

  • #2
    Hello pj909,

    You need to use a lowercase "i" with your if() statement.
    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
      thanks,

      Is there a way to control the formatting of the right margin. Specifically, I want to modify volumeMA.efs from the library. It prints the avg vol as 7 digits plus 2 decimal places. What I've got is:
      if(vAvg >= 1000000) {
      vReturnVal = Math.round(vAvg / 1000000) + "M";
      } else {
      vReturnVal = Math.round(vAvg / 1000) + "K";
      }

      but how do I tell it to use my values and override the values in the margin?

      Comment


      • #4
        pj909,

        Unfortunately, there is no way that I know of to do what you are looking for. In your example, when "M" or "K" is concatenated to the value it is converted into a string, and the Advanced Chart doesn't know how to plot a returned string.

        I'll pass this along as a suggestion for a future enhancement to our Product Development Team.
        Regards,
        Jay F.
        Product Manager
        _____________________________________
        Have a suggestion to improve our products?
        Click Support --> Request a Feature in eSignal 11

        Comment

        Working...
        X