module import { Settings } from "../../settings" ; import { NodeDisplayData , PartialButFor } from "../../types" ; export default function drawLabel ( context , data , settings ) { if ( ! data . label ) return ; const size = settings . labelSize , font = settings . labelFont , weight = settings . labelWeight , color = settings . labelColor . attribute ? data [ settings . labelColor . attribute ] || settings . labelColor . color || "#000" : settings . labelColor . color ; context . fillStyle = color ; context . font = `${ weight } ${ size }px ${ font }` ; context . fillText ( data . label , data . x + data . size + 3 , data . y + size / 3 ) ; }