JSFiddle - React, Tailwind, and code Playground

by migerh

HTML

<link rel="stylesheet" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css">
<script src="http://btmdxa.mat.uni-bayreuth.de/~michael/jsxgui/JSXGraph/src/loadjsxgraph.js"></script>
<div id="jxgbox"></div>

CSS

#jxgbox {
    width: 500px;
    height: 500px;
}

JavaScript

var board = JXG.JSXGraph.initBoard('jxgbox', {
    boundingbox: [-10, 10, 10, -10],
    axis: true,
    grid: true
});

var p1 = board.create('point', [0, 0]);
var p2 = board.create('point', [5, 5]);
var l = board.create('line', [p1,p2]);
var t = board.create('ticks', [l,[2]],{labels:["tick-tock"],drawLabels:true});

// in the link - http://jsxgraph.uni-bayreuth.de/docs/symbols/JXG.Ticks.html#labels
// it is mentioned that labels is an array of strings
// but it doesn't work.
// How can I set label as "tick-tock"