Configuration: default values should be consistent and easy to find for all graph types
Currently, configuration default values are all over the place for the different graph types. They are also implemented inconsistently. Some are in an object called LAYER_DEFAULTS in the file giraffe > src > constants > index.ts while others are implemented by their respective graph type's component. This makes it hard to find and enforce sensible defaults.
Proposal: all defaults should be in one spot so that they can be easily seen and compared. LAYER_DEFAULTS should hold all the default values and no defaults should be implemented by a graph type's component. LAYER_DEFAULTS should possibly be moved into its own file defaults.ts
--
UPDATE on Feb 9, 2022:
<Plot> uses a config, which is the interface between the user and Giraffe. From config, a spec is created for almost of the different graph types (or layers).
Ensure the following:
-
configshould be validated -
configshould be set with default values -
specshould be created only after the first two steps have been done