A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Decimals, Digit grouping

  1. #1
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472

    Decimals, Digit grouping

    Hi,

    Working with dynamic drawing af graphs I'm experiencing some problems with.
    Decimals.

    Basicly text-files are loaded into an app that draw a chart

    the text file looks like this ...

    528;585;306;337;569;851;1015;964;912;692;918;635

    On one PC the number 1015 is percieved as 1.015 regardless of the Regional settings on this PC??? (see attached gv_dec.gif)

    Does anybody have a clue on what's going????
    Any input is appreciated!
    //poden
    Attached Images Attached Images

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Can you control the limits of the axes? It looks like it's adjusting the number when it falls outside the range. Just a guess without knowing what graphing component you're using or seeing the code.

  3. #3
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    note the decimal sign in the BAD version.
    It only fails on some PC's that in a way percieves 1015 as 1.015 ... so it seems to be a system issue!

  4. #4
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    The only thing I can think of is that something is causing the 1015 to be formatted as "1.105" (where the "," on an english system is being replaced by a "." because of the regional settings) but that the charting component doesn't understand the regional "." format and is misinterpreting it as a fractional value and messing up the chart.

  5. #5
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    I split the values into an array ...
    528;585;306;337;569;851;1015;964;912;692;918;635

    In a loop the values are converted to numbers
    arrValues[i] = Number(arrValues[i])

    Do you think this could trigger the Decimal sign?

  6. #6
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    It shouldn't, but the component you're assigning taht value to may be doing some conversion for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center