WebglStep
The step based line plot
Hierarchy
↳ WebglStep
Index
Constructors
Properties
Methods
Constructors
constructor
+ new WebglStep(c
: ColorRGBA, num
: number): WebglStep
Overrides WebglBaseLine.constructor
Defined in src/WbglStep.ts:7
Create a new step line
example
Parameters:
Name | Type | Description |
---|---|---|
c | ColorRGBA | the color of the line |
num | number | - |
Returns: WebglStep
Properties
color
• color: ColorRGBA
Inherited from WebglBaseLine.color
Defined in src/WebglBaseLine.ts:24
The Color of the line
intensity
• intensity: number
Inherited from WebglBaseLine.intensity
Defined in src/WebglBaseLine.ts:7
loop
• loop: boolean
Inherited from WebglBaseLine.loop
Defined in src/WebglBaseLine.ts:54
if this is a close loop line or not
default
= false
numPoints
• numPoints: number
Inherited from WebglBaseLine.numPoints
Defined in src/WebglBaseLine.ts:13
The number of data point pairs in the line
offsetX
• offsetX: number
Inherited from WebglBaseLine.offsetX
Defined in src/WebglBaseLine.ts:42
The horixontal offset of the line
default
= 0
offsetY
• offsetY: number
Inherited from WebglBaseLine.offsetY
Defined in src/WebglBaseLine.ts:48
the vertical offset of the line
default
= 0
scaleX
• scaleX: number
Inherited from WebglBaseLine.scaleX
Defined in src/WebglBaseLine.ts:30
The horizontal scale of the line
default
= 1
scaleY
• scaleY: number
Inherited from WebglBaseLine.scaleY
Defined in src/WebglBaseLine.ts:36
The vertical sclae of the line
default
= 1
visible
• visible: boolean
Inherited from WebglBaseLine.visible
Defined in src/WebglBaseLine.ts:8
webglNumPoints
• webglNumPoints: number
Inherited from WebglBaseLine.webglNumPoints
Defined in src/WebglBaseLine.ts:60
total webgl number of points
internal
xy
• xy: Float32Array
Inherited from WebglBaseLine.xy
Defined in src/WebglBaseLine.ts:19
The data ponits for webgl array
internal
Methods
constY
â–¸ constY(c
: number): void
Defined in src/WbglStep.ts:74
Set a constant value for all Y values in the line
Parameters:
Name | Type | Description |
---|---|---|
c | number | constant value |
Returns: void
getX
â–¸ getX(index
: number): number
Defined in src/WbglStep.ts:38
Parameters:
Name | Type |
---|---|
index | number |
Returns: number
getY
â–¸ getY(index
: number): number
Defined in src/WbglStep.ts:46
Get an X value at a specific index
Parameters:
Name | Type | Description |
---|---|---|
index | number | the index of X |
Returns: number
lineSpaceX
â–¸ lineSpaceX(start
: number, stepsize
: number): void
Defined in src/WbglStep.ts:62
Make an equally spaced array of X points
example
Parameters:
Name | Type | Description |
---|---|---|
start | number | the start of the series |
stepsize | number | - |
Returns: void
setY
â–¸ setY(index
: number, y
: number): void
Defined in src/WbglStep.ts:33
Set the Y value at a specific index
Parameters:
Name | Type | Description |
---|---|---|
index | number | the index of the data point |
y | number | the vertical value of the data point |
Returns: void
shiftAdd
â–¸ shiftAdd(data
: Float32Array): void
Defined in src/WbglStep.ts:91
Add a new Y values to the end of current array and shift it, so that the total number of the pair remains the same
example
Parameters:
Name | Type | Description |
---|---|---|
data | Float32Array | the Y array |
Returns: void