<style>
.tickLabels {
background-color: white;
padding: 0px
}
</style>
// Define the id of your board in BOARDID
const board = JXG.JSXGraph.initBoard(BOARDID, {
boundingbox: [-9, 17, 9, -17],
axis: true,
defaultAxes: {
x: {
ticks: {
insertTicks: false, // Turn off automatic tick placing
minorTicks: 1, // One minor tick between two major ticks
minorHeight: -1, // Minor ticks are finitely long, too
ticksDistance: 2, // Major ticks are positioned at multiples of two
label: {
fontSize: 14,
display: 'html',
cssClass: 'tickLabels'
}
}
},
y: {
ticks: {
insertTicks: false, // Turn off automatic tick placing
minorTicks: 0, // No minor ticks between major ticks
ticksDistance: 2, // Major ticks are positioned at multiples of two
label: {
fontSize: 14,
display: 'html',
cssClass: 'tickLabels'
}
}
}
},
zoom: {
min: 0.5,
max: 2
}
});
This example is licensed under a
Creative Commons Attribution ShareAlike 4.0 International License.
Please note you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.