Subversion Repositories wimsdev

Rev

Rev 16489 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4897 bpr 1
JSXGraph
2
========
3
 
15332 obado 4
JavaScript library for interactive math visualizations in the web browser.
4897 bpr 5
 
6
About
7
-----
8
 
15332 obado 9
*JSXGraph* is a cross-browser library for interactive geometry, function plotting,
4897 bpr 10
charting, and data visualization in a web browser. It is implemented completely
15332 obado 11
in JavaScript, does not rely on any other library, and uses SVG, canvas, or even the venerable VML.
18584 obado 12
*JSXGraph* is easy to embed and has a small footprint: approx. 200 KByte if
4897 bpr 13
embedded in a web page. No plug-ins are required! Special care has been taken
14
to optimize the performance.
15
 
15332 obado 16
*JSXGraph* supports multi-touch events and runs on all major browsers, even on very old IEs.
4897 bpr 17
 
15332 obado 18
*JSXGraph* is developed at the
4897 bpr 19
Lehrstuhl für Mathematik und ihre Didaktik
20
University of Bayreuth, Germany
21
 
22
Website
23
-------
24
 
18584 obado 25
- Project web site: https://jsxgraph.org/
26
- Project wiki with hundreds of examples: https://jsxgraph.org/wiki/
27
- GitHub project site: https://github.com/jsxgraph/jsxgraph
28
- Mailing List/Google Group: https://groups.google.com/group/jsxgraph
29
- JSXGraph questions at https://stackoverflow.com/search?tab=newest&q=jsxgraph
30
- jsFiddle template: https://jsfiddle.net/8kep9syd/
31
- YouTube channel: https://www.youtube.com/channel/UCANBFoVoOyW2eNyTvx-VZdQ
32
- Moodle filter: https://github.com/jsxgraph/moodle-filter_jsxgraph
33
- (outdated: SourceForge project site: https://sf.net/projects/jsxgraph)
34
- CDNs: Embed JSXGraph via
4897 bpr 35
 
18584 obado 36
```html
15332 obado 37
<script type="text/javascript" charset="UTF-8"
16489 obado 38
 src="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore.js"></script>
15332 obado 39
<link rel="stylesheet"
16489 obado 40
 type="text/css" href="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraph.css" />
41
 ```
42
 
43
or
44
 
18584 obado 45
```html
16489 obado 46
<script type="text/javascript" charset="UTF-8"
18584 obado 47
 src="//cdnjs.cloudflare.com/ajax/libs/jsxgraph/1.4.6/jsxgraphcore.js"></script>
16489 obado 48
<link rel="stylesheet"
18584 obado 49
 type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/jsxgraph/1.4.6/jsxgraph.css" />
16489 obado 50
```
15332 obado 51
 
4897 bpr 52
Please report bugs to our issue tracking system found at
14118 obado 53
https://github.com/jsxgraph/jsxgraph/issues
4897 bpr 54
 
15332 obado 55
Usage
56
-----
4897 bpr 57
 
18584 obado 58
Include
16489 obado 59
 
18584 obado 60
- `jsxgraphcore.js` and
61
- `jsxgraph.css` and,
62
- if required, one or more file readers
16489 obado 63
 
18584 obado 64
from a CDN or a local version in your HTML file.
16489 obado 65
 
18584 obado 66
__HTML template:__
67
 
68
```html
69
<!doctype html>
70
<html lang="en">
71
  <head>
72
    <meta charset="UTF-8">
73
    <title>JSXGraph template</title>
74
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
75
    <link href="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraph.css" rel="stylesheet" type="text/css" />
76
    <script src="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore.js" charset="UTF-8"></script>
77
 
78
    <!-- The next line is optional: MathJax -->
79
    <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" id="MathJax-script" async></script>
80
  </head>
81
  <body>
82
 
83
  <div id="jxgbox" class="jxgbox" style="max-width:800px; aspect-ratio: 1/1;"></div>
84
 
85
  <script>
86
    var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-8, 8, 8, -8]});
87
    var p = board.create('point', [1, 3], {name: 'point'});
88
  </script>
89
 
90
  </body>
91
</html>
92
```
93
 
16489 obado 94
For developing content, it is recommended to include `jsxgraphsrc.js` (`jsxgraphcore.js` is the minified version of `jsxgraphsrc.js`).
95
For further usage instructions please consult our [wiki](https://jsxgraph.org/wiki/)
15332 obado 96
especially our [tutorials](https://jsxgraph.org/wiki/index.php/Documentation)
97
or [the API reference docs](https://jsxgraph.org/docs/).
98
 
99
Build and develop JSXGraph
4897 bpr 100
--------------
101
 
15332 obado 102
1) Clone this repository or download the zip file.
18584 obado 103
2) To build and develop *JSXGraph* you need [node.js](https://nodejs.org/) v0.6+. First, install all
15332 obado 104
dependencies required to build JSXGraph using npm in the JSXGraph root directory: `$ npm install`.
14118 obado 105
This will create a new subdirectory ```node_modules``` in the JSXGraph root directory which holds
18584 obado 106
all tools and libraries required to build ```jsxgraphcore.js```.
107
3) To build JSXGraph run `$ npm run buildCore`. This will output an non-minified version `jsxgraphsrc.js`
108
and the minified version `jsxgraphcore.js` into the folder `distrib`.
109
4) Develop JSXGraph:
110
  - Edit the source files in the folder `src`
111
  - Write unit tests in folder `test`
112
  - Run `$ npm run eslint` and `$ npm run test` to check for errors
113
  - Run `$ npm run check-format` to check the formatting of the source code
114
  - Submit a pull request
4897 bpr 115
 
18584 obado 116
Plug-ins
117
--------
4897 bpr 118
 
18584 obado 119
- [JSXGraph filter for moodle and formulas](https://moodle.org/plugins/filter_jsxgraph)
120
- [JSXGraph is in included in STACK](https://stack-assessment.org/)
121
- Mediawiki plug-in is available in the folder `plugins`
122
- [JSXGraph in Jupyter](https://pypi.org/project/jsxgraph-magic/)
123
- ...
4897 bpr 124
 
15332 obado 125
License
126
-------
14118 obado 127
 
128
JSXGraph is free software dual licensed under the GNU LGPL or MIT License.
4897 bpr 129
 
14118 obado 130
You can redistribute it and/or modify it under the terms of the
4897 bpr 131
 
18584 obado 132
- GNU Lesser General Public License as published by
14118 obado 133
    the Free Software Foundation, either version 3 of the License, or
134
    (at your option) any later version
18584 obado 135
 
136
or
4897 bpr 137
 
18584 obado 138
- MIT License: https://github.com/jsxgraph/jsxgraph/blob/master/LICENSE.MIT
139
 
14118 obado 140
JSXGraph is distributed in the hope that it will be useful,
141
but WITHOUT ANY WARRANTY; without even the implied warranty of
142
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
143
GNU Lesser General Public License for more details.
4897 bpr 144
 
14118 obado 145
You should have received a copy of the GNU Lesser General Public License and
15332 obado 146
the MIT License along with JSXGraph. If not, see <https://www.gnu.org/licenses/>
147
and <https://opensource.org/licenses/MIT/>.
148
 
149
[![ITEMS](img/items_logo_blue.png)](https://itemspro.eu)
150
[![Cofunded by the Erasmus+ programme of the European union](img/eu_flag_co_funded_pos_rgb_left_small.jpg)](https://ec.europa.eu/programmes/erasmus-plus/)