Skip to content

@sqlrooms/cosmos / createDefaultCosmosConfig

Function: createDefaultCosmosConfig()

createDefaultCosmosConfig(): object

Returns

NameTypeDescription
pointSizeScalenumberScale factor for point (node) sizes in the graph. Values > 1 make nodes larger, values < 1 make them smaller. Default 1.1
scalePointsOnZoombooleanWhen true, nodes will dynamically resize based on the current zoom level. This helps maintain visual clarity at different zoom levels. Default true
renderLinksbooleanControls whether links (edges) between nodes are displayed. Default true
linkWidthScalenumberScale factor for link (edge) width. Values > 1 make links thicker, values < 1 make them thinner. Default 1
linkArrowsSizeScalenumberScale factor for the size of directional arrows on links. Only applies when linkArrows is true. Default 1
linkArrowsbooleanWhen true, displays arrows indicating link direction. Useful for directed graphs. Default false
curvedLinksbooleanWhen true, links are rendered as curved Bezier paths. When false, links are straight lines. Default false
simulationGravitynumberControls the strength of the central gravitational force. Higher values pull nodes more strongly toward the center. Default 0.25
simulationRepulsionnumberControls how strongly nodes repel each other. Higher values create more space between unconnected nodes. Default 1.0
simulationLinkSpringnumberControls the strength of the spring force between linked nodes. Higher values pull connected nodes more tightly together. Default 1.0
simulationLinkDistancenumberThe natural or resting length of links between nodes. Higher values create more spacing between connected nodes. Default 10
simulationFrictionnumberControls how quickly node movement decays. Higher values (closer to 1) create more damped movement. Default 0.85
simulationDecaynumberControls how quickly the simulation stabilizes. Lower values result in longer, smoother transitions. Default 1000