visjs / vis-network

:dizzy: Display dynamic, automatically organised, customizable network views.
https://visjs.github.io/vis-network/
Apache License 2.0
3.01k stars 367 forks source link

Label on the shape image? #1188

Open gamadoleo opened 3 years ago

gamadoleo commented 3 years ago

hello i would like to know how to get around this problem, i can't make the label / description stay on the shape image, how to proceed? it is always below the image, he wanted it over the image.

image

Thomaash commented 3 years ago

Hi @gamadoleo,

the default shapes all have the label either bellow or within, it's not possible to move it anywhere else. You can however use the custom shape with its ctxRenderer function to create a shape which has the label above.

dylans commented 3 years ago

@Thomaash related to this, is there an example of a ctxRenderer function that shows how to draw a label?