Type Alias StylerBeta

Styler: {
    getG6EdgeStyle?: ((edge: EdgeSpec, originStyle: TODO, currentStyle: TODO) => Promise<TODO>);
    getG6NodeStyle?: ((entity: Entity, originStyle: TODO, currentStyle: TODO) => Promise<TODO>);
}

Type representing a styler with methods for getting G6 node and edge styles. See ColorByType.ts for an example

Type declaration

  • OptionalgetG6EdgeStyle?: ((edge: EdgeSpec, originStyle: TODO, currentStyle: TODO) => Promise<TODO>)

    Use this function to modify style of a edge from outside the graph. You can overwrite the style, but DO NOT merge currentStyle or originStyle when returning new styling (or rather styling patch). This can lead do recursive clone error later on. Merging with actual style will be handled automatically! Use them just as a reference, eg edge width to multiply.

      • (edge, originStyle, currentStyle): Promise<TODO>
      • Parameters

        • edge: EdgeSpec

          The edge specification for which to get the edge style.

        • originStyle: TODO

          The original style (the one passed to edge during it's initialization). See '@antv/graphin' -> EdgeStyle

        • currentStyle: TODO

          The current style. See '@antv/graphin' -> EdgeStyle

        Returns Promise<TODO>

        A promise that resolves to the style patch. See '@antv/graphin' -> EdgeStyle

  • OptionalgetG6NodeStyle?: ((entity: Entity, originStyle: TODO, currentStyle: TODO) => Promise<TODO>)
      • (entity, originStyle, currentStyle): Promise<TODO>
      • Parameters

        • entity: Entity

          The entity for which to get the node style.

        • originStyle: TODO
        • currentStyle: TODO

          for eg current node radius (if its a circural node), so you want to eg apply a holor like a heatmap by amount of connections.

        Returns Promise<TODO>

        A promise that resolves to the style patch. See '@antv/graphin' -> NodeStyle