ChartNumberFormat: Generates a d3 number format for use by charting functions.

View source: R/chartnumberformat.R

ChartNumberFormatR Documentation

Generates a d3 number format for use by charting functions.

Description

See https://github.com/d3/d3-format for more information on d3.

Usage

ChartNumberFormat(number.format, as.percentages = FALSE)

Arguments

number.format

A list of five unnamed items in the following order: 1) The type of number formatting. One of "Automatic", "Category", "Number", "Percentage", "Date/Time", "Currency", "Metric units suffix", "Scientific" and "Custom". 2) A d3 date format. If specified, this will be used provided type is neither "Automatic" nor "Category" nor a custom format is not specified. 3) A custom d3 number format. If specifed this will be used in preference to all other inputs apart from "Automatic" and "Category". 4) A boolean indicating whether to separate thousands with commas. 5) An integer specifying the number of decimal places, or for "Metric units suffix", the number of significant digits.

as.percentages

Whether the "Automatic" formatting should be as percentages.

Details

Defaults to "Automatic" if no type is specified.


Displayr/flipChartBasics documentation built on Feb. 26, 2024, 12:35 a.m.