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. Global Object
    8. Filtering
      1. Filter Object
      2. Number Query Object
      3. String Query Object
      4. Date Query Object
      5. Time Query Object
      6. Value Query Object
    9. Format Object
    10. Conditional Format Object
    11. Table Sizes Object
    12. Cell Data Object
    13. Chart Data Object
    14. Toolbar Object
    15. Chart Legend Data Object
    16. Share Report Connection Object
  3. Methods
    1. All methods
    2. addCalculatedMeasure
    3. addCondition
    4. alert
    5. clear
    6. clearFilter
    7. clearXMLACache
    8. closeFieldsList
    9. collapseAllData
    10. collapseCell
    11. collapseData
    12. connectTo
    13. customizeAPIRequest
    14. customizeCell
    15. customizeChartElement
    16. customizeContextMenu
    17. dispose
    18. drillDownCell
    19. drillUpCell
    20. expandAllData
    21. expandCell
    22. expandData
    23. exportTo
    24. getAllConditions
    25. getAllHierarchies
    26. getAllHierarchiesAsync
    27. getAllMeasures
    28. getAllMeasuresAsync
    29. getCell
    30. getColumns
    31. getColumnsAsync
    32. getCondition
    33. getFilter
    34. getFlatSort
    35. getFormat
    36. getMeasures
    37. getMeasuresAsync
    38. getMembers
    39. getMembersAsync
    40. getOptions
    41. getReport
    42. getReportFilters
    43. getReportFiltersAsync
    44. getRows
    45. getRowsAsync
    46. getSelectedCell
    47. getSort
    48. getTableSizes
    49. getXMLACatalogs
    50. getXMLACatalogsAsync
    51. getXMLACubes
    52. getXMLACubesAsync
    53. getXMLADataSources
    54. getXMLADataSourcesAsync
    55. getXMLAProviderName
    56. getXMLAProviderNameAsync
    57. load
    58. off
    59. on
    60. open
    61. openCalculatedValueEditor
    62. openFieldsList
    63. openFilter
    64. print
    65. refresh
    66. removeAllCalculatedMeasures
    67. removeAllConditions
    68. removeCalculatedMeasure
    69. removeCondition
    70. removeSelection
    71. runQuery
    72. save
    73. scrollToColumn
    74. scrollToRow
    75. setFilter
    76. setFlatSort
    77. setFormat
    78. setOptions
    79. setReport
    80. setSort
    81. setTableSizes
    82. shareReport
    83. showCharts
    84. showGrid
    85. showGridAndCharts
    86. sortingMethod
    87. sortValues
    88. 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.