Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial
  1. API reference
    1. Introduction
    2. Flexmonster()
  2. Objects
    1. All objects
    2. Report Object
    3. Data Source Object
    4. Mapping Object
    5. Slice Object
    6. Options Object
    7. Filtering
      1. Filter Object
      2. Number Query Object
      3. String Query Object
      4. Date Query Object
      5. Time Query Object
      6. Value Query Object
    8. Format Object
    9. Conditional Format Object
    10. Table Sizes Object
    11. Cell Data Object
    12. Chart Data Object
    13. Toolbar Object
    14. Chart Legend Data Object
  3. Methods
    1. All methods
    2. addCalculatedMeasure
    3. addCondition
    4. alert
    5. clear
    6. clearFilter
    7. clearXMLACache
    8. closeFieldsList
    9. collapseAllData
    10. collapseData
    11. connectTo
    12. customizeAPIRequest
    13. customizeCell
    14. customizeChartElement
    15. customizeContextMenu
    16. dispose
    17. expandAllData
    18. expandData
    19. exportTo
    20. getAllConditions
    21. getAllHierarchies
    22. getAllMeasures
    23. getCell
    24. getColumns
    25. getCondition
    26. getFilter
    27. getFlatSort
    28. getFormat
    29. getMeasures
    30. getMembers
    31. getOptions
    32. getReport
    33. getReportFilters
    34. getRows
    35. getSelectedCell
    36. getSort
    37. getTableSizes
    38. getXMLACatalogs
    39. getXMLACubes
    40. getXMLADataSources
    41. getXMLAProviderName
    42. load
    43. off
    44. on
    45. open
    46. openCalculatedValueEditor
    47. openFieldsList
    48. openFilter
    49. print
    50. refresh
    51. removeAllCalculatedMeasures
    52. removeAllConditions
    53. removeCalculatedMeasure
    54. removeCondition
    55. removeSelection
    56. runQuery
    57. save
    58. scrollToColumn
    59. scrollToRow
    60. setFilter
    61. setFlatSort
    62. setFormat
    63. setOptions
    64. setReport
    65. setSort
    66. setTableSizes
    67. showCharts
    68. showGrid
    69. showGridAndCharts
    70. sortingMethod
    71. sortValues
    72. updateData
  4. Events
    1. All events
    2. afterchartdraw
    3. aftergriddraw
    4. beforegriddraw
    5. beforetoolbarcreated
    6. cellclick
    7. celldoubleclick
    8. chartclick
    9. datachanged
    10. dataerror
    11. datafilecancelled
    12. dataloaded
    13. drillthroughclose
    14. drillthroughopen
    15. exportcomplete
    16. exportstart
    17. fieldslistclose
    18. fieldslistopen
    19. filterclose
    20. filteropen
    21. loadingdata
    22. loadinglocalization
    23. loadingolapstructure
    24. loadingreportfile
    25. localizationerror
    26. localizationloaded
    27. olapstructureerror
    28. olapstructureloaded
    29. openingreportfile
    30. printcomplete
    31. printstart
    32. querycomplete
    33. queryerror
    34. ready
    35. reportchange
    36. reportcomplete
    37. reportfilecancelled
    38. reportfileerror
    39. runningquery
    40. unauthorizederror
    41. update
  5. Custom data source API
    1. All requests
    2. /handshake request
    3. /fields request
    4. /members request
    5. /select request for the pivot table
    6. /select request for the flat table
    7. /select request for the drill-through view
    8. Field Object
    9. Filter Object
    10. Filter Group Object
  6. MongoDB Connector API
    1. All methods
    2. getSchema
    3. getMembers
    4. getSelectResult
  7. Flexmonster Connector for amCharts
    1. All methods
    2. amcharts.getData
    3. amcharts.getCategoryName
    4. amcharts.getMeasureNameByIndex
    5. amcharts.getNumberOfMeasures
    6. amcharts.getNumberFormatPattern
Table of contents

Format Object

Format object defines the way how numeric values are formatted in the component. It contains the following number format parameters:

  • name – String. Should be unique as it identifies the format in the report. Note: the format with the name property set to "" defines a default number format and it is applied to all the measures without a specific number format. Default value: "".
  • thousandsSeparator – String. Default value: " " (space).
  • decimalSeparator – String. Default value: ".".
  • decimalPlaces – Number. The exact number of decimals to show after the decimal separator. When set to -1, the entire number is shown. Note that for e-notation numbers (e.g., 5.8e+23), at least one decimal is always shown after the decimal separator, even if decimalPlaces is set to 0. Default value: -1.
  • maxDecimalPlaces – Number. The maximum number of decimals to show after the decimal separator. When set to -1, the entire number is shown. Note that for e-notation numbers (e.g., 5.8e+23), at least one decimal is always shown after the decimal separator, even if maxDecimalPlaces is set to 0. Default value: -1.
  • maxSymbols – Number. The maximum number of symbols in a cell. Default value: 20.
  • negativeNumberFormat – String. The format of the negative numbers. It can be one of the following values: "-1", "- 1", "1-", "1 -", and "(1)". Default value: "-1".
  • currencySymbol – String. The symbol which is shown to the left or the right of the value (e.g. currency symbol, hours, percent, etc.). Default value: "".
  • positiveCurrencyFormat – String. The format of the currency symbol. It can be either "$1" or "1$". Default value: "$1".
  • negativeCurrencyFormat – String. The format of the currency symbol to display negative amounts. It can have the following values: "-$1", "-1$", "$-1", "$1-", "1-$", "1$-", "($1)", and "(1$)". Default value: "-$1".
  • isPercent – Boolean. When set to true, data is formatted as percentage. The behavior is the same as in Excel. Setting isPercent to true will result in numbers being multiplied by 100 and shown with a % symbol. For example, 0.56 gets changed to 56%. Note: if % is set as currencySymbol, setting isPercent to true will not multiply numbers by 100. Default value: false.
  • nullValue – String. Defines how to show null values in the grid. Default value: "".
  • infinityValue – String. Defines how to show infinity values in the grid. Default value: "Infinity".
  • divideByZeroValue – String. Defines how to show divided by zero values in the grid. Default value: "Infinity".
  • textAlign – String. The alignment of formatted values in cells on the grid. It can have the following values: "right", "left", and "center". Default value: "right".
  • beautifyFloatingPoint – Boolean. When set to true, formats numbers like 1.560000000000001 as 1.56. Setting beautifyFloatingPoint to false means that the entire number will be shown. Default value: true.

Set Format Object via setFormat() API call. Get this object using getFormat().

Find more details in Number formatting tutorial.