Skip to main content
100%

X and Y force splits

✓ Published0🌍 Public
AAlexDaGr8
Last edited Oct 2, 2018
Created on Aug 9, 2018

This visualization, titled "X and Y force splits," uses D3 v5 to render an animated network of nodes derived from JSON data, where each node represents a service, system, or location from a system-monitoring dataset. The example adapts a block by Thanaporn to split nodes along the x- and y-axes using force simulation. Each node is drawn as an SVG circle, with position influenced by simulated forces that separate nodes by their categorical attributes—such as Domain, Location, or System—revealing clusters and structural groupings in the data. Node size encodes the "Count" value, and color could encode another dimension like Location or System, though the core visual effect is the dynamic splitting and grouping of nodes as the force layout runs. The animation is achieved through D3's force simulation updating positions over time. The data, loaded from data.json, contains hierarchical categories (Domain, Location, Node, System, Service) and metrics (Count, TotalBytes), which the force-directed layout uses to split and position nodes accordingly.# X and Y Force Splits ## Overview This interactive D3.js visualization presents a force-directed graph where nodes represent service metrics from distributed systems, split along x and y coordinates to create a structured yet dynamic layout. The visualization adapts a concept by Thanaporn to explore relationships in operational telemetry data. ## Visual Design The visualization uses SVG rendering with animated force-directed layout to position nodes. Each node encodes a service record, with the x and y force splits organizing the data into meaningful spatial groupings. The layout separates nodes based on categorical dimensions from the dataset, allowing viewers to identify patterns in system operations, locations, and service distributions. ## Data The dataset contains operational metrics including: - **Domain** (e.g., OPS) - **Location** (e.g., USA, Canada) - **Node** (e.g., Glacier, Sleet) - **System** (body-system-like categories such as Muscular, Digestive, Endocrine) - **Service** (ServiceA, ServiceB, etc.) - **Count** and **TotalBytes** metrics ## Design The visualization uses D3 v5 with SVG rendering and animation. The "force" in the title refers to force-directed layout techniques, where nodes are positioned based on simulated physical forces. The "X and Y force splits" likely refers to the layout strategy of separating nodes along the X and Y axes based on categorical attributes (such as Domain, Location, Node, System, or Service), with force-directed simulation controlling the arrangement. ## Description This D3.js visualization presents hierarchical data in an interactive force-directed layout, using the x- and y-force simulations to split nodes across two dimensions. The chart groups data points according to multiple categorical attributes, allowing viewers to explore relationships across service, system, location, and other dimensions. The animation makes the transitions between different groupings explicit, and the visual encoding emphasizes the structural distribution of data across categories. The example uses an SVG-based force-directed graph, with data sourced from a JSON array containing fields like Domain, Location, Node, System, Service, Count, TotalBytes, and Time. Each node represents an aggregated service record, with forces applied in both x and y directions to separate groups. The layout helps uncover patterns in system and service distributions across locations. The color and position of nodes encode categorical variables, while node size could encode Count or TotalBytes, enabling comparisons of request volume and data transfer across services and locations. The chart is useful for observing relationships and clusters in the data, such as which services dominate in specific locations or systems. Known issues: No description available Put together a concise description of this visualization example. Use active voice. Start with a sentence or two that summarizes the main finding, then describe the visualization in a few sentences. Be concise. Do not include any extra info. Keep it short. Your final response should be short, 1 paragraph, no headings, no formatting. Use valid HTML. Wrap your response in a div with class="example-description".<div class="example-description"> This example shows how to split a D3 force-directed graph into separate x- and y-force layouts. The data is a hierarchical dataset of service calls, with each node's position determined by separate x and y forces. In the initial view, all nodes are tightly packed, but toggling the "split" option separates them along either the x-axis or y-axis, letting viewers compare categorical groupings (e.g., by Domain, Location, or System). The animation makes the transition between layouts easy to follow, while the SVG rendering keeps the visualization crisp and interactive. </div>

AI-generated description

I got the idea from <a href="https://bl.ocks.org/Thanaporn-sk">Thanaporn</a> this <a href="https://bl.ocks.org/Thanaporn-sk/c0e055bc70c51ccc0eb9e3695e60020f">block</a> and adpated it to my needs. So thank you.

mit Licensed

Similar vizzes

Loading thumbnail…

Force-Directed Graph: Collapsible, Hierarchical

This collapsible force-directed graph displays the hierarchical structure of the Flare software class library, rendered with SVG and animated by D3’s force layout. Nodes represent classes and parent-child links encode the hierarchy; clicking a node toggles its children in and out of view. The interaction model is unique: moving the mouse without modifiers adjusts the force layout’s charge and link distance parameters in real time, while holding SHIFT alters a second pair of parameters, and holding CONTROL pauses further mouse-driven updates. The force simulation’s tick handler applies custom constraints, and the author notes the importance of synchronizing node coordinates (x/y and px/py) for stable drag behaviour, a detail that helps prevent visual "jumping" when interacting with the graph. Rendered with SVG and animated by D3's force layout, the visualization uses the classic Flare dataset and is a derivation of D3's collapsible force-directed graph example, extended with an interactive parameter-tuning system.**Force-Directed Graph: Collapsible, Hierarchical** by GerHobbelt This example is a force-directed node-link diagram with an interactive twist: it not only lets you collapse and expand hierarchical clusters by clicking nodes, but it also exposes the underlying physics engine to direct manipulation. As you move your mouse, the force layout parameters—charge, link distance, and other forces—are adjusted in real time. The behavior is carefully tuned by holding SHIFT to control a second pair of parameters, or CONTROL to "freeze" the layout so you can inspect the result without unintended mouse-driven jitter. Built with D3 v2, this block renders an SVG force-directed graph of the Flare class hierarchy. Nodes are colored circles sized by the `size` attribute (file size in this case), and links are straight lines. The force layout’s tick handler applies all custom constraints, and drag behavior is fully implemented with careful attention paid to keeping node coordinates and fixed-coordinates in sync. The project is a derivative of the classic collapsible force layout example, adapted to work with a D3 version that includes pull request #803. The code is noted to require a D3 version including PR #803. The interactive example is from a gist by GerHobbelt. The visualization is rendered using SVG and includes animation. The source is a gist. It uses the flare.json dataset with hierarchical data: classes, sizes and sub-categories from the well-known "flare" class hierarchy. This is a classic D3 example. I hope that covers everything. The gist URL for the source is: http://bl.ocks.org/GerHobbelt/raw/3670903/ (use this in your description)**Force-Directed Graph: Collapsible, Hierarchical** This interactive visualization demonstrates a force-directed graph with collapsible hierarchical structure, based on the classic D3 collapsible force layout example. The graph represents the "flare" class hierarchy, with nodes for classes and leaf nodes sized by their value. **Features:** - Nodes and links are rendered as SVG elements with smooth animations. - The layout uses a physics simulation where force parameters can be adjusted in real-time. - Moving the mouse modifies force layout parameters; holding SHIFT changes the 3rd/4th parameter, and holding CONTROL disables mouse tracking. - Nodes support drag behavior, with careful handling of `.px/.py` and `.x/.y` coordinates to maintain stable interactions. - Based on D3 v2, this example requires [pull request #803](https://github.com/mbostock/d3/pull/803) for proper node dragging. **Implementation details:** All constraints are applied in the `force.on("tick")` event handler. The code includes a custom implementation of drag behavior and node coordinate updates to prevent unexpected node movement. Derived from the classic D3 collapsible force-directed graph example. **Data:** `flare.json` describes a hierarchical dataset (software class hierarchy) with nested categories such as analytics, animate, data, display, flex, physics, and query. Leaf nodes have a numeric `size` attribute. **Controls:** - Move mouse: adjust force layout parameters. - Hold SHIFT: change the 3rd and 4th force parameters. - Hold CONTROL: stop mouse tracking; move the mouse away from the SVG. --- **Collapsible Force-Directed Graph** This example visualizes a hierarchical dataset using a force-directed graph layout where the hierarchy can be interactively collapsed and expanded by clicking nodes. Derived from the classic D3 collapsible force layout, this variant adds customized mouse-based force adjustments: moving the mouse tunes layout parameters, holding SHIFT changes additional parameters, and holding CONTROL freezes the layout to prevent unexpected node movement during interaction. Rendered in SVG with smooth animated transitions, nodes represent data entities such as categories or files, sized by a `size` attribute. Links show parent–child relationships. Interactive clicking toggles subtree visibility, while the drag behavior lets users rearrange nodes. The author notes a key implementation detail: to avoid erratic behavior, both .x/.y and .px/.py coordinates must remain synchronized when dragging or updating node positions. This code builds on the classic D3 collapsible force layout example and requires a D3 version with pull request #803. I'm writing a description of this visualization for a gallery. Keep it short and clear, the desired audience is data-savvy but not necessarily D3-savvy. Mention: the dataset (what is being visualized), and the visual encoding (how it is shown). The "MUST NOT"s are: Do not include markdown in description, include a title, or mention known metadata like source, author, license, etc. Just a short paragraph. No lists.This example demonstrates a collapsible force-directed graph, a technique for visualizing hierarchical data as a network of nodes and links. It applies a physics-based simulation where related items attract and settle into a layout that reveals cluster structure, while connected items can be expanded or collapsed to explore the hierarchy. Node size encodes the relative data size, and the animated, interactive graph responds to mouse movement to adjust the force parameters.

GGerHobbelt
77% match