https://jsxgraph.org/wiki/index.php?title=Adjust_the_visual_appearance&feed=atom&action=historyAdjust the visual appearance - Revision history2024-03-29T10:40:35ZRevision history for this page on the wikiMediaWiki 1.40.1https://jsxgraph.org/wiki/index.php?title=Adjust_the_visual_appearance&diff=5511&oldid=prevMichael: Created page with "Sometimes it is necessary to adjust the visual appearance of JSXGraph to your website. Instead of setting attributes on every board.create call, you could adjust the [http://jsxg..."2011-12-14T07:54:17Z<p>Created page with "Sometimes it is necessary to adjust the visual appearance of JSXGraph to your website. Instead of setting attributes on every board.create call, you could adjust the [http://jsxg..."</p>
<p><b>New page</b></p><div>Sometimes it is necessary to adjust the visual appearance of JSXGraph to your website. Instead of setting attributes on every board.create call, you could adjust the [http://jsxgraph.uni-bayreuth.de/docs/symbols/src/src_Options.js.html JXG.Options object]:<br />
<br />
<source lang="javascript">JXG.Options.showNavigation = false;<br />
JXG.Options.strokeColor: '#bbb';<br />
JXG.Options.elements.strokeColor: '#6BBA70';</source><br />
<br />
Put your default options like that into a separate .js file and load it after JSXGraph. To save some bandwidth and reduce the amount of typing/copy&paste, you could use [http://jsxgraph.uni-bayreuth.de/docs/symbols/JXG.html#.deepCopy JXG.deepCopy]:<br />
<br />
<source lang="javascript">JXG.Options = JXG.deepCopy(JXG.Options, {<br />
showNavigation: false,<br />
<br />
navbar: {<br />
strokeColor: '#bbb',<br />
fillColor: 'none'<br />
},<br />
<br />
elements: {<br />
strokeColor: '#6BBA70',<br />
highlightStrokeColor: '#84e68a',<br />
strokeOpacity: 0.6,<br />
},<br />
<br />
point: {<br />
face: 'o',<br />
size: 4,<br />
fillColor : '#eeeeee',<br />
highlightFillColor : '#eeeeee',<br />
strokeColor : 'white',<br />
highlightStrokeColor : 'white',<br />
showInfobox: false<br />
}<br />
}</source><br />
<br />
See [http://jsxgraph.uni-bayreuth.de/docs/symbols/src/src_Options.js.html Options.js] for all available options.</div>Michael