UNPKG
@nepwork/dashboards
Version:
latest (0.0.2)
0.0.2
Dashboards for emergencies and monitoring
github.com/nepwork/admin-ui
nepwork/admin-ui
@nepwork/dashboards
/
hgraph
/
node_modules
/
d3-shape
/
src
/
symbol
/
triangle.js
12 lines
(10 loc)
•
255 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
var
sqrt3 =
Math
.
sqrt
(
3
);
export
default
{
draw
:
function
(
context, size
) {
var
y = -
Math
.
sqrt
(size / (sqrt3 *
3
)); context.
moveTo
(
0
, y *
2
); context.
lineTo
(-sqrt3 * y, -y); context.
lineTo
(sqrt3 * y, -y); context.
closePath
(); } };