Comments (7)
- The data we generated is a "graph" which has two sides; left and right side. Each side may have none to multiple nodes.
- Unfortunatley, the proposed solution wouldn't be usable for us since the data is not a tree.
from visualization.
I have looked into this and there is a relatively easy way to add additional forces to influence which side they end up on.
Questions:
- Is your data genuinely a "graph" or is it a "tree"?
- If it is a tree, would adapting https://raw.githack.com/hpcc-systems/Visualization/trunk/demos/gallery/gallery.html?./samples/tree/Dendrogram to allow left AND right branches be a better viz?
from visualization.
Note to self: https://github.com/d3/d3-force/blob/main/README.md#positioning
from visualization.
yes this positioning function is something that may be useful for us! @GordonSmith would you mind sending us a very simple example code where you position a node to a desired location? Maybe push node B to all the way right and push node A to all the way left? If you could update the code snippet below that would be super helpful for us.
import { Graph2 } from "@hpcc-js/graph";
const data = {
vertices: [
{id: 0,text: "A",categoryID: 0},
{id: 1,text: "B",categoryID: 0},
{id: 2,text: "C",categoryID: 1},
]
};
data.edges = [
{id: 0,source: data.vertices[2],target: data.vertices[0]},
{id: 1,source: data.vertices[2],target: data.vertices[1]}
];
new Graph2()
.categories([
{id:0,imageChar:"fa-user"},
{id:1,imageChar:"fa-asterisk"}
])
.data(data)
.target("target")
.layout("ForceDirected")
.applyScaleOnLayout(true)
.highlightSelectedPathToCentroid(true)
.enableTooltipPointerEvents(false)
.render()
;
from visualization.
hi @GordonSmith would it be possible for you to provide us a simple example using positioning logic you mentioned in your previous comment? Thank you very much!
from visualization.
My previous comments was referencing information needed to implement the feature - rather than it existing...
The following code is where the current force is initialised: https://github.com/hpcc-systems/Visualization/blob/trunk/packages/graph/src/graph2/layouts/forceDirected.ts#L43-L68
I think we would need 3 simulations - center, left and right and then filter the vertices
appropriately into each of the 3 sims?
from visualization.
yes that sounds correct! please let me know if there are any updates or any code snippets that I can use! Thank you very much!
@GordonSmith
from visualization.
Related Issues (20)
- Stacked column chart labels overlap with small values HOT 1
- Add KB Tab Support to common/TitleBar
- Add KB Tab Support to ChartPanel
- Add KB Tab support to legends
- Wsdl-TS generate JSON metadata equivalent to the TYPES
- Column default value format string is rounding to 2 places
- Tooltip Value and Column Value our of sync
- [Graph] Right Click support for Vertices
- GraphT throwing error when eventPath is undefined HOT 1
- Fix security issue detected by CheckMarx tool. HOT 3
- Adding image support to the Graph2
- Question: Theme for hpcc-dockpanel HOT 2
- LogaccessService, GetLogsExRequest class should be an string[]
- Bump Observable HQ libs
- Fix @hpcc-js/comms CI tests
- undici causing tests to fail
- Feature: Add Protect and Unprotect functions to Visualization Workunit Class
- XYAxis internal margins
- Add the ability to disable tooltips on Gantt / Timeline
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visualization.