JsXgraph多边形标签位置

时间:2012-10-21 20:02:27

标签: jsx

如何更改多边形的标签位置?

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 个答案:

答案 0 :(得分:1)

在JSXGraph中,多边形标签默认居中。您可以提供偏移值(以像素为单位)     label:{offset:[xoff,yoff]}

请参阅http://jsxgraph.uni-bayreuth.de/wiki/index.php/Positioning_of_labels