altair.theme.HeaderConfigKwds#
- class altair.theme.HeaderConfigKwds#
altair.HeaderConfigTypedDictwrapper.- Parameters:
- format
The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.
If the format type is
"number"(e.g., for quantitative fields), this is a D3’s number format pattern string.If the format type is
"time"(e.g., for temporal fields), this is either: a) D3’s time format pattern if you desire to set a static time format.b) dynamic time format specifier object if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).
When used with a custom formatType, this value will be passed as
formatalongsidedatum.valueto the registered function.Default value: Derived from numberFormat config for number format and from timeFormat config for time format.
- formatType
The format type for labels. One of
"number","time", or a registered custom format type.Default value:
"time"for temporal fields and ordinal and nominal fields withtimeUnit."number"for quantitative fields as well as ordinal and nominal fields withouttimeUnit.
- labelAlign
Horizontal text alignment of header labels. One of
"left","center", or"right".- labelAnchor
The anchor position for placing the labels. One of
"start","middle", or"end". For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.- labelAngle
The rotation angle of the header labels.
Default value:
0for column header,-90for row header.- labelBaseline
The vertical text baseline for the header labels. One of
"alphabetic"(default),"top","middle","bottom","line-top", or"line-bottom". The"line-top"and"line-bottom"values operate similarly to"top"and"bottom", but are calculated relative to thetitleLineHeightrather thantitleFontSizealone.- labelColor
The color of the header label, can be in hex color code or regular color name.
- labelExpr
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
labelandvalueproperties of the header’s backingdatumobject.- labelFont
The font of the header label.
- labelFontSize
The font size of the header label, in pixels.
- labelFontStyle
The font style of the header label.
- labelFontWeight
The font weight of the header label.
- labelLimit
The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0, indicating no limit- labelLineHeight
Line height in pixels for multi-line header labels or title text with
"line-top"or"line-bottom"baseline.- labelOrient
The orientation of the header label. One of
"top","bottom","left"or"right".- labelPadding
The padding, in pixel, between facet header’s label and the plot.
Default value:
10- labels
A boolean flag indicating if labels should be included as part of the header.
Default value:
true.- orient
Shortcut for setting both labelOrient and titleOrient.
- title
Set to null to disable title for the axis, legend, or header.
- titleAlign
Horizontal text alignment (to the anchor) of header titles.
- titleAnchor
The anchor position for placing the title. One of
"start","middle", or"end". For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.- titleAngle
The rotation angle of the header title.
Default value:
0.- titleBaseline
The vertical text baseline for the header title. One of
"alphabetic"(default),"top","middle","bottom","line-top", or"line-bottom". The"line-top"and"line-bottom"values operate similarly to"top"and"bottom", but are calculated relative to thetitleLineHeightrather thantitleFontSizealone.Default value:
"middle"- titleColor
Color of the header title, can be in hex color code or regular color name.
- titleFont
Font of the header title. (e.g.,
"Helvetica Neue").- titleFontSize
Font size of the header title.
- titleFontStyle
The font style of the header title.
- titleFontWeight
Font weight of the header title. This can be either a string (e.g
"bold","normal") or a number (100,200,300, …,900where"normal"=400and"bold"=700).- titleLimit
The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0, indicating no limit- titleLineHeight
Line height in pixels for multi-line header title text or title text with
"line-top"or"line-bottom"baseline.- titleOrient
The orientation of the header title. One of
"top","bottom","left"or"right".- titlePadding
The padding, in pixel, between facet header’s title and the label.
Default value:
10
- __init__(*args, **kwargs)#
Methods
__init__(*args, **kwargs)clear(/)Remove all items from the dict.
copy(/)Return a shallow copy of the dict.
fromkeys(iterable[, value])Create a new dictionary with keys from iterable and values set to value.
get(key[, default])Return the value for key if key is in the dictionary, else default.
items(/)Return a set-like object providing a view on the dict's items.
keys(/)Return a set-like object providing a view on the dict's keys.
pop(key[, default])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem(/)Remove and return a (key, value) pair as a 2-tuple.
setdefault(key[, default])Insert key with a value of default if key is not in the dictionary.
update([E, ]**F)If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values(/)Return an object providing a view on the dict's values.
Attributes
formatformatTypelabelAlignlabelAnchorlabelAnglelabelBaselinelabelColorlabelExprlabelFontlabelFontSizelabelFontStylelabelFontWeightlabelLimitlabelLineHeightlabelOrientlabelPaddinglabelsorienttitletitleAligntitleAnchortitleAngletitleBaselinetitleColortitleFonttitleFontSizetitleFontStyletitleFontWeighttitleLimittitleLineHeighttitleOrienttitlePadding