How to use the labella.Node function in labella

To help you get started, we’ve selected a few labella examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nteract / semiotic / src / components / AnnotationLayer.tsx View on Github external
topNodes.map(d => {
            const noteX = d.props.noteData.x[0] || d.props.noteData.x
            return new labella.Node(
              noteX,
              noteDataWidth(d.props.noteData, characterWidth) + padding
            )
          })
        )
github nteract / semiotic / src / components / AnnotationLayer.tsx View on Github external
leftNodes.map(d => {
            const noteY = d.props.noteData.y[0] || d.props.noteData.y
            return new labella.Node(
              noteY,
              noteDataHeight(d.props.noteData, characterWidth, lineHeight) +
                padding
            )
          })
        )
github kristw / d3kit-timeline / src / main.js View on Github external
const nodes = data.map(d => {
      const bbox = dummyText
        .call(this.updateLabelText, labelTextStyle, d)
        .node()
        .getBBox();
      const w = bbox.width + options.labelPadding.left + options.labelPadding.right;
      const h = bbox.height + options.labelPadding.top + options.labelPadding.bottom;
      const node = new labella.Node(
        timePos(d),
        (options.direction==='left' || options.direction==='right') ? h : w,
        d
      );
      node.w = w;
      node.h = h;
      return node;
    });

labella

May the force label you.

Apache-2.0
Latest version published 7 years ago

Package Health Score

56 / 100
Full package analysis