Theme & Options Editor
The JSXGraph Theme & Options Editor is a tool for reworking JSXGraph’s option defaults. It was created with the help of AI. It comes as two single HTML files that work offline, with no server and no build step.
JSXGraph Theme & Options Editor
Editor
The editor puts the more than 1.500 option values from options.js and options3d.js
into one searchable table. Each value gets the input that suits it: a color
picker, a dropdown for booleans, a number field, a text area for
arrays and functions.
Preview
The preview page shows the changes.
Export
You can export in three ways:
- A small overrides file contains the differences to the default options ans is to be merged with JXG.Options at run time.
- The complete options.js and options3d.js are your originals.
- A JSON schema lets you reload your work later and carry on.
Using an options file
In the example below, a new options file my-new-options.js is included in the
head of an HTML page, after jsxgraphcore.js. The order matters: JSXGraph
reads JXG.Options when an element is created, so the file has to be in place
before the first initBoard() or JXG.board().
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My JSXGraph Example</title>
<script src="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore.js"></script>
<script src="my-new-options.js"></script>
<link rel="stylesheet" type="text/css"
href="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraph.css">
</head>
<body>
...
</body>
</html>
Themes
The following five themes can be included:
- modern, built on the Wong palette and safe for colour blindness
- grayscale
- bw-print
- sepia
- fancy
Download themes.zip