Config Module
datachart.config
Attributes
datachart.config.config
The configuration instance that the users should interact with.
Classes
datachart.config.Config
The class representing the configuration options.
ATTRIBUTE | DESCRIPTION |
---|---|
config |
The style configuration.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
set_theme |
Set the global configuration to match the theme. |
reset_config |
Resets the global configuration. |
update_config |
Updates the global configuration. |
get |
Gets the associated configuration attribute. |
set_theme
Sets the global configuration to match the theme.
Examples:
>>> from datachart.constants import THEME
>>> from datachart.config import config
>>> config.set_theme(THEME.DEFAULT)
>>> config.get("theme")
'default'
PARAMETER | DESCRIPTION |
---|---|
theme |
The theme to be set.
TYPE:
|
reset_config
update_config
Updates the global configuration.
Examples:
>>> from datachart.config import config
>>> config.update_config({"font_general_color": "#FFFFFF"})
>>> config.get("font_general_color")
'#FFFFFF'
PARAMETER | DESCRIPTION |
---|---|
config |
The configuration attributes to be updated.
TYPE:
|
__getitem__
get
Gets the associated configuration attribute.
Examples:
PARAMETER | DESCRIPTION |
---|---|
attr |
The attribute to retrieve.
TYPE:
|
default |
The value to return, if the attribute is not present in the config.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
The attribute value if present. Otherwise, returns the |