A module to visualize time-related data.
Classes
Methods
inner createBottomArc(x, y, radiusX, radiusY, heightDelta, heightOld)
Creates the svg path string for the bottom circle/arc of a bar
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the x-coordinate of the center |
y |
number | the y-coordinate of the center |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
heightDelta |
number | the height of the arc (not the height of the bar i.e. must be <= radiusY - heightOld) |
heightOld |
number | the old height (where the arc should start) |
inner createHorizontalBar(x, y, radiusX, radiusY, widthDelta, widthOld, widthMax)
Creates the svg path string for a horizontal bar
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x-coordinate of the left side of the bar |
y |
number | y-coordinate of the top side of the bar |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
widthDelta |
number | the width of the bar-portion |
widthOld |
number | the width where the bar-portion should start |
widthMax |
number | the full width of the bar chart |
inner createLeftArc(x, y, radiusX, radiusY, widthDelta, widthOld)
Creates the svg path string for the left circle/arc of a bar
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the x-coordinate of the center |
y |
number | the y-coordinate of the center |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
widthDelta |
number | the width of the arc (not the height of the bar i.e. must be <= radiusX - widthOld) |
widthOld |
number | the old width (where the arc should start) |
inner createRightArc(x, y, radiusX, radiusY, widthDelta, widthOld)
Creates the svg path string for the right circle/arc of a bar
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the x-coordinate of the center |
y |
number | the y-coordinate of the center |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
widthDelta |
number | the width of the arc (not the height of the bar i.e. must be <= radiusX - widthOld) |
widthOld |
number | the old width (where the arc should start) |
inner createTopArc(x, y, radiusX, radiusY, heightDelta, heightOld)
Creates the svg path string for the top circle/arc of a bar
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the x-coordinate of the center |
y |
number | the y-coordinate of the center |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
heightDelta |
number | the height of the arc (not the height of the bar i.e. must be <= radiusY - heightOld) |
heightOld |
number | the old height (where the arc should start) |
inner createVerticalBar(x, y, radiusX, radiusY, heightDelta, heightOld, heightMax)
Creates the svg path string for a vertical bar
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x-coordinate of the left side of the bar |
y |
number | y-coordinate of the bottom side of the bar |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
heightDelta |
number | the height of the bar-portion |
heightOld |
number | the height where the bar-portion should start |
heightMax |
number | the full height of the bar chart |
inner describeArc(x, y, radiusX, radiusY, startAngle, endAngle, outerArc)
Creates the svg path string for an arc
Parameters:
Name | Type | Description |
---|---|---|
x |
number | the x-coordinate of the center |
y |
number | the y-coordinate of the center |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
startAngle |
number | the angle at which the arc starts |
endAngle |
number | the angle at which the arc ends |
outerArc |
number | the flag for the outer arc |
inner polarToCartesian(centerX, centerY, radiusX, radiusY, angleInDegrees)
Generates coordinates for arcs based on the center position, the radius and the angle
Parameters:
Name | Type | Description |
---|---|---|
centerX |
number | the x-coordinate of the center |
centerY |
number | the y-coordinate of the center |
radiusX |
number | the x-radius |
radiusY |
number | the y-radius |
angleInDegrees |
number | the angle |