Override in subclass to add special extents, such as included values
Updates the extents associated with each attribute, then autodomains all scales the Plot uses.
Adds a given CSS class to the Component.
The CSS class to add.
Adds a Dataset to the Plot.
Returns whether the plot will be animated.
Enables or disables animation.
Gets the AccessorScaleBinding for a particular attribute.
Sets a particular attribute to a constant value or the result of an Accessor.
Sets a particular attribute to a scaled constant value or scaled result of an Accessor. The provided Scale will account for the attribute values when autoDomain()-ing.
Gets the automatic domain adjustment mode for visible points.
Sets the automatic domain adjustment mode for visible points to operate against the X Scale, Y Scale, or neither. If "x" or "y" is specified the adjustment is immediately performed.
One of "x"/"y"/"none". "x" will adjust the x Scale in relation to changes in the y domain. "y" will adjust the y Scale in relation to changes in the x domain. "none" means neither Scale will change automatically.
Gets the Selection containing the
Will return undefined if the Component has not been anchored.
background selection for the Component
for the component in pixel space, where the topLeft represents the component's minimum x and y values and the bottomRight represents the component's maximum x and y values.
Gets a Selection containing a
Will return undefined if the Component has not been anchored.
content selection for the Component
Returns the whether or not the rendering is deferred for performance boost.
The deferred rendering option
Sets / unsets the deferred rendering option Activating this option improves the performance of plot interaction (pan / zoom) by performing lazy renders, only after the interaction has stopped. Because re-rendering is no longer performed during the interaction, the zooming might experience a small resolution degradation, before the lazy re-render is performed.
This option is intended for cases where performance is an issue.
Gets the Entities associated with the specified Datasets.
The Datasets to retrieve the Entities for. If not provided, returns defaults to all Datasets on the Plot.
Gets the PlotEntities at a particular Point.
The point to query.
The PlotEntities at the particular point
Gets the Entities that intersect the Bounds.
Gets the Entities that intersect the area defined by the ranges.
Checks if the Component has a fixed height or if it grows to fill available space. Returns false by default on the base Component class.
Checks if the Component has a fixed width or if it grows to fill available space. Returns false by default on the base Component class.
Gets the Selection containing the
Will return undefined if the Component has not been anchored.
Checks if the Component has a given CSS class.
The CSS class to check for.
Gets the height of the Component in pixels.
Gets whether labels are enabled.
Sets whether labels are enabled. Labels too big to be contained in the rectangle, cut off by edges, or blocked by other rectangles will not be shown.
Removes a callback that would be called on anchoring the Component to the DOM. The callback is identified by reference equality.
Removes a callback to be called when the Component is detach()-ed. The callback is identified by reference equality.
Adds a callback to be called on anchoring the Component to the DOM. If the Component is already anchored, the callback is called immediately.
Adds a callback to be called when the Component is detach()-ed.
Sets a callback that gets called when the component resizes. The size change is not guaranteed to be reflected by the DOM at the time the callback is fired.
Gets the origin of the Component relative to its parent.
Gets the origin of the Component relative to the root
Gets the parent ComponentContainer for this Component.
Sets the parent ComponentContainer for this Component. An error will be thrown if the parent does not contain this Component. Adding a Component to a ComponentContainer should be done using the appropriate method on the ComponentContainer.
Causes the Component to re-layout and render.
This function should be called when a CSS change has occured that could influence the layout of the Component, such as changing the font size.
Removes a given CSS class from the Component.
The CSS class to remove.
Removes a Dataset from the Plot.
Queues the Component for rendering.
Renders the Component to a given
A selector-string for the
Given available space in pixels, returns the minimum width and height this Component will need.
Adjusts the domains of both X and Y scales to show all data. This call does not override the autorange() behavior.
Gets the width of the Component in pixels.
Gets the AccessorScaleBinding for X.
Sets X to a constant number or the result of an Accessor
Sets X to a scaled constant value or scaled result of an Accessor. The provided Scale will account for the values when autoDomain()-ing.
Gets the AccessorScaleBinding for X2.
Sets X2 to a constant number or the result of an Accessor. If a Scale has been set for X, it will also be used to scale X2.
Gets the x alignment of the Component.
Sets the x alignment of the Component.
The x alignment of the Component ("left"/"center"/"right").
Gets the AccessorScaleBinding for Y.
Sets Y to a constant number or the result of an Accessor
Sets Y to a scaled constant value or scaled result of an Accessor. The provided Scale will account for the values when autoDomain()-ing.
Gets the AccessorScaleBinding for Y2.
Sets Y2 to a constant number or the result of an Accessor. If a Scale has been set for Y, it will also be used to scale Y2.
Gets the y alignment of the Component.
Sets the y alignment of the Component.
The y alignment of the Component ("top"/"center"/"bottom").
Generated using TypeDoc
A Rectangle Plot displays rectangles based on the data. The left and right edges of each rectangle can be set with x() and x2(). If only x() is set the Rectangle Plot will attempt to compute the correct left and right edge positions. The top and bottom edges of each rectangle can be set with y() and y2(). If only y() is set the Rectangle Plot will attempt to compute the correct top and bottom edge positions.