JSXgraph polygon label position

658 Views Asked by At

How can I change the label position for a polygon?

p = this.board.create('polygon',[p1,p2,p4,p3],{
  withLines:false,
  withLabel: true,
  name: function () {
    return "lala  " + p1.Dist(p2).toFixed(2) + "m";
  },
  id: p3.X() + "_" + p4.Y()
});
1

There are 1 best solutions below

0
On BEST ANSWER

In JSXGraph the polygon label is centered by default. You can supply offset values (in pixel) by label: { offset:[xoff, yoff] }

See http://jsxgraph.uni-bayreuth.de/wiki/index.php/Positioning_of_labels.