Skip to content

Number Formatting

Number formatting allows you to control how numeric values are displayed throughout Honeycomb Maps. You can format numbers as currency, percentages, dates, large numbers with suffixes (like "1.5M"), and more. This ensures that your data is presented in a clear, professional manner that's appropriate for your specific use case.

Where Number Formatting Is Applied

Number formatting can be configured in several places:

  • Big Number components: Format the primary metric displayed
  • Tooltips: Format numeric values that appear when hovering over map features (points, H3 hexagons, polygons, lines, arcs)
  • Legends: Format values displayed in color scale legends

Available Format Types

Auto

The default formatting option that automatically formats numbers based on your browser's locale settings.

When to use:

  • When you want simple, locale-appropriate number formatting
  • For general numeric values that don't need special formatting

Example:

  • Input: 1234567.89
  • Output: 1,234,567.89 (in US locale)

Number

Customizable numeric formatting with control over decimal places, thousands separators, and sign display.

Configuration options:

  • Decimal Places: Number of digits after the decimal point (0-10)
  • Thousands Separator: Show commas or spaces between thousands
  • Sign Display:
    • Auto: Show minus sign for negative numbers only
    • Always: Show + for positive, - for negative
    • Parentheses: Show negative numbers in parentheses (e.g., (123))

When to use:

  • When you need precise control over number display
  • For financial reports or technical data requiring specific decimal places

Examples:

  • 2 decimal places, thousands separator: 1,234.56
  • No decimal places: 1,235
  • Always show sign: +1,234.56 or -1,234.56
  • Parentheses for negatives: (1,234.56)

Percent

Format numbers as percentages with optional automatic conversion.

Configuration options:

  • Decimal Places: Number of digits after the decimal point
  • Multiply by 100: When enabled, automatically converts decimals to percentages (e.g., 0.15 → 15%)

When to use:

  • For conversion rates, growth metrics, or efficiency scores
  • When displaying proportions or ratios

Examples:

  • With multiply by 100: Input 0.1547 → Output 15.47%
  • Without multiply: Input 15.47 → Output 15.47%
  • 1 decimal place: 15.5%
  • No decimals: 15%

Currency

Format numbers as monetary values with customizable currency symbols.

Configuration options:

  • Currency Symbol: The symbol to display (e.g., $, €, £, ¥)
  • Symbol Position: Prefix (before the number) or Suffix (after the number)
  • Decimal Places: Number of digits after the decimal point
  • Thousands Separator: Show commas between thousands
  • Negative Style:
    • Minus: Standard minus sign (e.g., -$1,234)
    • Parentheses: Accounting style (e.g., ($1,234))

When to use:

  • For revenue, sales, prices, costs, or any financial metrics
  • When displaying monetary values in dashboards or reports

Examples:

  • US Dollar: $1,234.56
  • Euro suffix: 1.234,56€
  • Negative with parentheses: ($1,234.56)
  • No decimal places: $1,235

Date/Time

Convert timestamps to human-readable date and time formats.

Configuration options:

  • Date Style: Short, Medium, Long, or Full
    • Short: 1/15/25
    • Medium: Jan 15, 2025
    • Long: January 15, 2025
    • Full: Wednesday, January 15, 2025
  • Time Style: Short, Medium, Long, or Full (optional)
    • Short: 3:30 PM
    • Medium: 3:30:45 PM
  • Custom Format: Advanced pattern-based formatting (e.g., YYYY-MM-DD HH:mm)

When to use:

  • For displaying dates in tooltips or summary metrics
  • When showing temporal data like order dates, event times, or timestamps

Examples:

  • Date only, medium style: Jan 15, 2025
  • Date and time: Jan 15, 2025, 3:30 PM
  • Custom format: 2025-01-15 15:30
  • Full date: Wednesday, January 15, 2025

Compact

Format large numbers with K, M, B (thousand, million, billion) suffixes for easier reading.

Configuration options:

  • Decimal Places: Number of digits after the decimal point
  • Base: Choose automatic scaling or fixed (1K, 1M, 1B)
  • Show Suffix: Display or hide the K/M/B suffix

When to use:

  • For large metrics like population, revenue, or counts
  • In space-constrained displays like small dashboard cards
  • When exact values are less important than magnitude

Examples:

  • Automatic scaling:
    • 1,2341.2K
    • 1,234,5671.2M
    • 1,234,567,8901.2B
  • Fixed 1M base: 1,234,5671.23M
  • No suffix: 1,234,5671.23 (with base 1M)

Custom

Advanced pattern-based formatting for specialized needs.

Configuration:

  • Pattern: A format string with special characters
    • #: Digit placeholder (shown only if present)
    • 0: Digit placeholder (always shown, pads with zeros)
    • ,: Thousands separator
    • .: Decimal point
    • 'text': Literal text in single quotes

When to use:

  • For highly specialized formatting requirements
  • When none of the standard formats meet your needs

Examples:

  • #,##0.00: 1,234.56
  • #,##0.00 'units': 1,234.56 units
  • 000000: 001234 (zero-padded)
  • #.##%: 12.35%

Unit Labels

All format types support optional unit labels that can be added as a prefix or suffix to the formatted value.

Configuration options:

  • Unit Text: The text to display (e.g., "mm", "/year", "items", "°F")
  • Position: Prefix (before) or Suffix (after) the formatted number

When to use:

  • To add units of measurement to numeric values
  • For rates or ratios (e.g., "per year", "per capita")
  • When displaying scientific or technical measurements

Examples:

  • Temperature: 72°F or 22°C
  • Rate: 50 mph or 1,500/year
  • Measurement: 125mm or 5.2kg
  • Prefix unit: $1,234.56 (currency symbol as prefix)

Use Cases

Here are some common scenarios and recommended formatting options:

Business Dashboards

  • Total Revenue: Currency format ($1.2M or use Compact with $ prefix)
  • Conversion Rate: Percent format with 2 decimals (15.47%)
  • Order Count: Compact format for large numbers (1.2K orders)
  • Average Order Value: Currency format with 2 decimals ($45.67)

Location Analytics

  • Population Density: Number format with units (1,234/km²)
  • Distance: Number format with units (5.2 miles)
  • Coverage Area: Number format with units (1,234 km²)

Time-Based Analysis

  • Date Range: Date format (Jan 15, 2025)
  • Growth Rate: Percent format (15.5% year-over-year)
  • Daily Average: Number format with units (1,234 units/day)

Real-Time Monitoring

  • Current Value: Number format with appropriate precision
  • Percentage Change: Percent format with sign always shown (+15.5%)
  • Timestamp: Date/Time format (Jan 15, 2025, 3:30 PM)

Best Practices

  • Consistency: Use the same formatting for similar metrics across your map to avoid confusion
  • Precision: Choose decimal places appropriate to your data - too many can clutter, too few can lose important information
  • Context: Add unit labels when the units aren't obvious from context
  • Scale: Use Compact format for very large numbers to improve readability
  • Localization: Consider your audience's location when choosing number and date formats
  • Testing: View your formatted numbers with actual data to ensure they display as expected

Technical Notes

  • Number formatting is applied when values are displayed, not to the underlying data
  • Formatting settings are saved with your map configuration
  • Different fields can have different formatting in the same tooltip
  • Formatting is consistent across viewer and editor modes