giraffe icon indicating copy to clipboard operation
giraffe copied to clipboard

Configuration: default values should be consistent and easy to find for all graph types

Open TCL735 opened this issue 5 years ago • 0 comments

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:

  • config should be validated
  • config should be set with default values
  • spec should be created only after the first two steps have been done

TCL735 avatar Jan 14 '21 01:01 TCL735