Announcement

Collapse
No announcement yet.

Need Help With Decimal Points, Please

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

  • Need Help With Decimal Points, Please

    Hello,
    I have prices that show up on the body of my chart with 12 decimal places. I would like only 2. In researching this problem on the various forums, I found a thread that stated to add .toFixed(2) to the array. I tried that, but it didn't work. The array ,from my study, reads: return NewArray(Value3,Value4). Can you help, please? Thanks so much.
    Diane

  • #2
    Diane
    You need to apply .toFixed() to the individual elements of the array not the array itself
    Note that when you apply .toFixed() to a value that value is converted to a string which a chart does not plot
    If you run a search for toFixed you should find some posts with examples on how to use it
    Alex

    Comment


    • #3
      Hi Alex,
      Thanks for your fast response. I applied .toFixed(2) to each element as you suggested, but it still didn't work. I then listed each value as a separate NewArray & that didn't work. I'm sure I'm making this much more difficult than it really is. Could you perhaps show me an example? Thanks.
      Diane

      Comment


      • #4
        Hi Alex,
        I didn't see your last sentence about running a search. Sorry. I'll do it now. Thanks again, for all your help!
        Diane

        Comment

        Working...
        X