altair.theme.FormatConfigKwds#

class altair.theme.FormatConfigKwds#

altair.FormatConfig TypedDict 包装器。

参数:
normalizedNumberFormat

如果未指定 normalizedNumberFormatType,则这是 D3 数字格式,用于规范化堆叠字段(具有 stack: "normalize" 的字段)的轴标签、文本标记和工具提示。例如,"s" 用于 SI 单位。使用D3 的数字格式模式。如果指定了 config.normalizedNumberFormatTypeconfig.customFormatTypestrue,则此值将作为 formatdatum.value 一起传递给 config.numberFormatType 函数。默认值: %

如果指定了 config.normalizedNumberFormatType 并且 config.customFormatTypestrue,这个值将作为 formatdatum.value 一起传递给 config.numberFormatType 函数。默认值: %

normalizedNumberFormatType

config.normalizedNumberFormat自定义格式类型

默认值: undefined – 这相当于调用 D3 格式,该格式在 Vega 表达式中以 format 形式公开注意:要使用此功能,还必须将 customFormatTypes 设置为 true

numberFormat

如果未指定 numberFormatType,则这是 D3 数字格式,用于非规范化字段(没有 stack: "normalize" 的字段)的指南标签、文本标记和工具提示。例如,"s" 用于 SI 单位。使用D3 的数字格式模式。如果指定了 config.numberFormatTypeconfig.customFormatTypestrue,则此值将作为 formatdatum.value 一起传递给 config.numberFormatType 函数。

如果指定了 config.numberFormatType 并且 config.customFormatTypestrue,这个值将作为 formatdatum.value 一起传递给 config.numberFormatType 函数。

numberFormatType

config.numberFormat自定义格式类型

默认值: undefined – 这相当于调用 D3 格式,该格式在 Vega 表达式中以 format 形式公开注意:要使用此功能,还必须将 customFormatTypes 设置为 true

timeFormat

文本标记、图例标签和标题标签中原始时间值(无时间单位)的默认时间格式。

默认值: "%b %d, %Y" 注意:轴会自动确定每个标签的格式,因此此配置不会影响轴。

timeFormatType

config.timeFormat自定义格式类型

默认值: undefined – 这相当于调用 D3 时间格式,该格式在 Vega 表达式中以 timeFormat 形式公开注意:要使用此功能,还必须将 customFormatTypes 设置为 true,并且不能定义 timeUnit

__init__(*args, **kwargs)#

方法

__init__(*args, **kwargs)

clear()

copy()

fromkeys(iterable[, value])

创建一个新字典,其键来自 iterable,值设置为 value。

get(key[, default])

如果 key 在字典中,则返回 key 的值;否则返回 default。

items()

keys()

pop(key[, default])

如果未找到 key,如果给定 default 则返回 default;否则引发 KeyError。

popitem(/)

移除并返回一个 (key, value) 对作为 2 元组。

setdefault(key[, default])

如果 key 不在字典中,则插入 key 并设置其值为 default。

update([E, ]**F)

如果 E 存在且具有 .keys() 方法,则为 E 中的每个 k 执行 D[k] = E[k]。如果 E 存在但缺少 .keys() 方法,则为 E 中的每个 k, v 执行 D[k] = v。在任一情况下,随后为 F 中的每个 k 执行 D[k] = F[k]。

values()

属性

normalizedNumberFormat

normalizedNumberFormatType

numberFormat

numberFormatType

timeFormat

timeFormatType