Constructor
new Curve(data, options)
Create a curve visual.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Array.<Object> | An array of data. |
options |
Object | Configuration options. |
- Source:
Methods
addProperty(name, value)
Add the specified property to this visual. The property is stored as [name, value].
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The name of the property. |
value |
string | The value of the property. |
- Source:
appendData(data)
Append the provided data array to the existing data array in this visual.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Array | The data array to append. |
- Source:
canDeleteTime(baseTime, deltaTime)
Determines whether time in the specified time range can be deleted.
Parameters:
| Name | Type | Description |
|---|---|---|
baseTime |
number | The start of the selection. |
deltaTime |
number | The end of the selection. |
- Source:
deleteTime(baseTime, deltaTime)
Deletes time based on the specified selection range.
Parameters:
| Name | Type | Description |
|---|---|---|
baseTime |
number | The start of the selection. |
deltaTime |
number | The end of the selection. |
- Source:
delineate(dx, pointerX, pointerY, callDrawopt)
Edit values for points by moving the mouse.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dx |
number | Delta x. | ||
pointerX |
number | Pointer x. | ||
pointerY |
number | Pointer y. | ||
callDraw |
boolean |
<optional> |
true | Whether to call draw() from this method. |
- Source:
deselect(callDrawopt)
Deselect this curve and optionally redraw it.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
callDraw |
boolean |
<optional> |
true | Whether to call draw() from this method. |
- Source:
draw()
Draw this visual.
- Source:
drawAreaCurve()
Draw an area curve.
- Source:
drawLineCurve()
Draw a line curve.
- Source:
erase()
Erase this visual.
- Source:
includeVisual(visualType, options)
Include the visual type indicated by the type string with the specified options.
Parameters:
| Name | Type | Description |
|---|---|---|
visualType |
string | The visual type. |
options |
object | Options for the visual type. |
- Source:
initialize(parentElement, width, height, timeScale)
Initialize this visual.
Parameters:
| Name | Type | Description |
|---|---|---|
parentElement |
Element | The parent element. |
width |
number | The parent width. |
height |
number | The parent height. |
timeScale |
d3.scaleLinear | The time scale. |
- Source:
insertTime(baseTime, deltaTime)
Inserts time based on the specified selection range.
Parameters:
| Name | Type | Description |
|---|---|---|
baseTime |
number | The start of the selection. |
deltaTime |
number | The end of the selection. |
- Source:
select(callDrawopt)
Select this curve and optionally redraw it.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
callDraw |
boolean |
<optional> |
true | Whether to call draw() from this method. |
- Source:
setEditor(editor)
Set the editor for this visual and set editing callbacks.
Parameters:
| Name | Type | Description |
|---|---|---|
editor |
object | The VisualEditor to set. |
- Source:
setValueRange(start, end)
Set the range for values in this visual.
Parameters:
| Name | Type | Description |
|---|---|---|
start |
number | The start of the range. |
end |
number | The end of the range. |
- Source: