Skip to content
mkraska edited this page Jun 29, 2022 · 6 revisions

[ "dim", "name", [x1, y1], [x2,y2], off ]

Linear dimension with label

  • "name" label text, typeset in MathJax math mode (stars * are replaced by small spaces \;)
  • [x1, y1], [x2,y2] reference points
  • off offset of the actual annotation from the baseline defined by the reference points. Offset counts positive to the left side seen from point 1 to point 2. If zero, short end lines are drawn.

image

[
  [ "grid", "x","y", -5,5,-4,5, 50, [1,1], [0,0] ],
  [ "dim", "name", [1, 2], [3,2], -1 ],
  [ "point", "1", [1,2] ],
  [ "point", "2", [3,2] ]
]

image

[
  [ "grid", "x","y", -1,9,-4,5, 50, [1,1], [0,0] ],
  [ "dim", "2*a", [1, 2], [3,2], -0.5 ],
  [ "dim", "2*b", [1, 2], [3,2], 0.5 ],
  [ "point", "1", [1,2] ],
  [ "point", "2", [3,2] ],
  [ "dim", "c", [5, 2], [4,2], -0.5 ],
  [ "dim", "d", [5, 2], [4,2], 0.5 ],
  [ "point", "1", [5,2] ],
  [ "point", "2", [4,2] ],
  [ "dim", "\\ell", [6, 2], [7,2], 0 ],
  [ "dim", "\\ell", [6, 1.5], [7,1.5], 0 ],
  [ "point", "1", [6,2] ],
  [ "point", "2", [7,2] ]
]

Tryout Space

In order to try code snippets in jsfiddle,

  1. copy the code from the wiki page to the clipboard
  2. follow the link for the JSXGraph version you want to try
  3. Replace the code in the HTML section (contents of <p hidden id="init">) with the content of the clipboard
Clone this wiki locally