Variable Drawing

Drawing: {
    DisplaceEdgeInY: ((LineMap, displacement) => Map<number, Line>);
    DisplaceVertices: ((Graph, parameter, displacement) => void);
    DrawEdgeBundling: ((LineMap, iterations, distance) => Promise<Map<number, Line>>);
    DrawEdgeLines: ((Graph, divDistance) => Map<number, Line>);
    DrawEdgeLinesDivisions: ((Graph, numberOfDivs) => Map<number, Line>);
    HivePlot: ((Graph, selectedNode, step, startPosition) => Promise<{
        emap: Map<number, Line>;
        pmap: Map<any, any>;
    }>);
    InstanciateRandomPositions: ((Graph) => Map<number, Point>);
    MoveGraph: ((Graph, dispacement) => void);
    SimulateKamadaKawai: ((Graph, iterations, simulationBound?, cohesionValue?, repulsionValue?) => Promise<Map<number, Point>>);
    UpdateEdgeLinesDist: ((Graph, divDistance) => void);
    UpdateEdgeLinesDivs: ((Graph, Divs) => void);
}

Type declaration

  • DisplaceEdgeInY: ((LineMap, displacement) => Map<number, Line>)
      • (LineMap, displacement): Map<number, Line>
      • Displace the edges vertically, almost akin to the Deck.gl arcs The displacement is done in a sin curve with the ends still touching the nodes Note: This is an inplace modification of the edges

        Parameters

        • LineMap: Map<number, Line>

          The map of edges as a line map

        • displacement: number

          the amount of vertical displacement

        Returns Map<number, Line>

  • DisplaceVertices: ((Graph, parameter, displacement) => void)
      • (Graph, parameter, displacement): void
      • Displace the vertices vertically based on some prameter (For example degree or modularity)

        Parameters

        • Graph: Graph

          the graph whos nodes have to be displaced

        • parameter: string

          the prameter based on which you want to modify the

        • displacement: number

          the maximum amunt of displacement, all the other values are rescaled linerly

        Returns void

  • DrawEdgeBundling: ((LineMap, iterations, distance) => Promise<Map<number, Line>>)
      • (LineMap, iterations, distance): Promise<Map<number, Line>>
      • Edge bundling - this isnt as fast as the current KDE based methods - but it provides a basic method of Visualizing large edge flows. Note: This is an aysnc function as it takes a while for the edge bundling to happen

        Parameters

        • LineMap: Map<number, Line>

          The map of edges as a line map

        • iterations: number

          The number of iterations to run edge bundling

        • distance: number

          A shorthand for how close together the vertices need to be before they get influnced by each other

        Returns Promise<Map<number, Line>>

        A line map with all the updated positions of the line (Where they are bundled together) Again - this needs to be applied to the graph!

  • DrawEdgeLines: ((Graph, divDistance) => Map<number, Line>)
      • (Graph, divDistance): Map<number, Line>
      • Constructs the edges as lines, Note: these are just a representation of the lines they then have to be visulized using one of the Three JS Drawer functions like draw a thick line or a thin line. This draws out the edges divided by some number of divisions that you specify

        Parameters

        • Graph: Graph

          The graph whos edges are getting drawn

        • divDistance: number

          How many divisions (distance) to make along the edge

        Returns Map<number, Line>

        A line map - which holds a map of all the edge indices and the corresponding line representations

  • DrawEdgeLinesDivisions: ((Graph, numberOfDivs) => Map<number, Line>)
      • (Graph, numberOfDivs): Map<number, Line>
      • Constructs the edges as lines, Note: these are just a representation of the lines they then have to be visulized using one of the Three JS Drawer functions like draw a thick line or a thin line - this draws them based on the number of divisions you would like them to have

        Parameters

        • Graph: Graph

          The graph whos edges are getting drawn

        • numberOfDivs: number

          How many divisions to make along the edge

        Returns Map<number, Line>

        A line map - which holds a map of all the edge indices and the corresponding line representations

  • HivePlot: ((Graph, selectedNode, step, startPosition) => Promise<{
        emap: Map<number, Line>;
        pmap: Map<any, any>;
    }>)
      • (Graph, selectedNode, step, startPosition): Promise<{
            emap: Map<number, Line>;
            pmap: Map<any, any>;
        }>
      • Generates a hive plot for a graph, this includes the option to displace the graph vertically based on degrees and how far away each node is

        Parameters

        • Graph: Graph

          The graph

        • selectedNode: number

          the node around which the hive plot is generated

        • step: number

          If the hive should step up or down if yes then by what increments

        • startPosition: Point

          Starting position

        Returns Promise<{
            emap: Map<number, Line>;
            pmap: Map<any, any>;
        }>

  • InstanciateRandomPositions: ((Graph) => Map<number, Point>)
      • (Graph): Map<number, Point>
      • Randomly sets all the positions for a graph Not really very useful but I've used it in some cases and have kept it around

        Parameters

        • Graph: Graph

          The graph who's nodes you would want to reposition

        Returns Map<number, Point>

        A position map of all the nodes and its corresponding positions

  • MoveGraph: ((Graph, dispacement) => void)
      • (Graph, dispacement): void
      • Move a graph somewhere (like the physical location) - This is an inplace movement and overwrites existing values

        Parameters

        • Graph: Graph

          The graph that has to be moved

        • dispacement: Point

          This is a point and I end up using Point and Vector interchangably. So here the xyz values from the point are used to displace the nodes

        Returns void

  • SimulateKamadaKawai: ((Graph, iterations, simulationBound?, cohesionValue?, repulsionValue?) => Promise<Map<number, Point>>)
      • (Graph, iterations, simulationBound?, cohesionValue?, repulsionValue?): Promise<Map<number, Point>>
      • Simulates Kamada kawai for a network in 2d. 3d is not supported yet Note: This is an async function as it take time for some of the large graphs

        Parameters

        • Graph: Graph

          The first input number

        • iterations: number

          The second input number

        • simulationBound: number = 100

          The bounds of simulation (Mostly a global number to scale the graph up or down)

        • cohesionValue: number = 1

          How sticky the nodes are i.r. how much they cluster together

        • repulsionValue: number = 1

        Returns Promise<Map<number, Point>>

        And node map of all the nodes and their simulated positions - Please note: position maps have to to be applied to the graph!

  • UpdateEdgeLinesDist: ((Graph, divDistance) => void)
      • (Graph, divDistance): void
      • Draw new lines from edges, and draw them based on the distance of divisions (i.e. divide the line up every 10 units) Note: This is an in place update that takes place on the graph - it overwrites the existing data.

        Parameters

        • Graph: Graph

          The grapht who's edges have to be updated

        • divDistance: number

          The distance by which the divisions are made

        Returns void

  • UpdateEdgeLinesDivs: ((Graph, Divs) => void)
      • (Graph, Divs): void
      • Draw new lines from edges, and draw them based on divisions (i.e. divide the line into 10 units) Note: This is an in place update that takes place on the graph - it overwrites the existing data.

        Parameters

        • Graph: Graph

          The grapht who's edges have to be updated

        • Divs: number

          The number of divisions to be made

        Returns void

Generated using TypeDoc