<commit_before># [candela](..#readme).VisComponent

The base class for Candela visualization components.

This class is intentionally very minimal, because there are only a few common features of
all Candela components:

1. Candela components perform some type of visualization that may be rendered in a web environment.
2. Candela components are instantiated with the syntax [new VisComponent(el, options)](#new-viscomponentel-options).
3. Candela components report their expected inputs in [VisComponent.spec](#viscomponentspec).

## new VisComponent(el, options)

**Note**: The constructor for the abstract superclass is empty. You should use the constructor for specific subclasses of VisComponent.

* **el** is a valid container for the visualization. The container will often be
a DOM element such as `<div>`, but may need to be another type for certain
visualizations.

* **options** is an object containing the initial options for the visualization.
This includes any data, visual mappings, or other settings pertinent to the
visualization. Options are specified in the form `{name: value}`.

## VisComponent.spec

**Note**: The specification for the abstract superclass is empty. You should access the specification for specific subclasses of VisComponent.

The `spec` field is a static property on the component's class which describes
how to set up the visualization.

| Property    | Type   | Description  |
| :--------   | :----- | :----------- |
| container   | Class  | Optional. The type of container this visualization can be added to. Default is DOMElement if unset. |
| options     | Array of [Option](#option-specification) | A specification of options needed for this visualization. This is used to introspect the component to implement features such as automatic UI building. |

### Option Specification

The specification for an option is an object containing the following properties:

| Property    | Type   | Description  |
| :--------   | :----- | :----------- |
| name        | String | The name of the option. |
| type        | String | The type of the option. Type and format follow [girder_worker types/formats](http://girder-worker.readthedocs.org/en/latest/types-and-formats.html). |
| format      | String | The format (specific encoding within a type) of the option. Type and format follow [girder_worker types/formats](http://girder-worker.readthedocs.org/en/latest/types-and-formats.html). |
| domain      | [Domain](#domain-specification) | Optional. A restriction on this option’s set of allowed values. |

### Domain Specification
<commit_msg>Remove confusing sentence about spec<commit_after># [candela](..#readme).VisComponent

The base class for Candela visualization components.

This class is intentionally very minimal, because there are only a few common features of
all Candela components:

1. Candela components perform some type of visualization that may be rendered in a web environment.
2. Candela components are instantiated with the syntax [new VisComponent(el, options)](#new-viscomponentel-options).
3. Candela components report their expected inputs in [VisComponent.spec](#viscomponentspec).

## new VisComponent(el, options)

**Note**: The constructor for the abstract superclass is empty. You should use the constructor for specific subclasses of VisComponent.

* **el** is a valid container for the visualization. The container will often be
a DOM element such as `<div>`, but may need to be another type for certain
visualizations.

* **options** is an object containing the initial options for the visualization.
This includes any data, visual mappings, or other settings pertinent to the
visualization. Options are specified in the form `{name: value}`.

## VisComponent.spec

**Note**: The specification for the abstract superclass is empty.

The `spec` field is a static property on the component's class which describes
how to set up the visualization.

| Property    | Type   | Description  |
| :--------   | :----- | :----------- |
| container   | Class  | Optional. The type of container this visualization can be added to. Default is DOMElement if unset. |
| options     | Array of [Option](#option-specification) | A specification of options needed for this visualization. This is used to introspect the component to implement features such as automatic UI building. |

### Option Specification

The specification for an option is an object containing the following properties:

| Property    | Type   | Description  |
| :--------   | :----- | :----------- |
| name        | String | The name of the option. |
| type        | String | The type of the option. Type and format follow [girder_worker types/formats](http://girder-worker.readthedocs.org/en/latest/types-and-formats.html). |
| format      | String | The format (specific encoding within a type) of the option. Type and format follow [girder_worker types/formats](http://girder-worker.readthedocs.org/en/latest/types-and-formats.html). |
| domain      | [Domain](#domain-specification) | Optional. A restriction on this option’s set of allowed values. |

### Domain Specification

{'fraction_non_alphanumeric': 0.09839593114241002, 'fraction_numerical': 0.0011737089201877935, 'mean_word_length': 3.888145315487572, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3204135', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1253, 'n_words': 598}