You can customize the visual appearance of the graph query results by creating custom styles and applying various layouts.
Ultipa Manager offers advanced functionality for styling nodes and edges with color, size, shape, and label, based on their schema and value of property.
The styles created by different users in the same instance are shared. In terms of applying styles, Ultipa Manager remembers the specific style you last used for a particular graphset, and automatically applies it when you switch back to that graphset next time. This feature saves time and ensures a seamless experience when working with different graphsets.
If no custom style is applied, Ultipa Manager utilizes a default style that assigns unique colors to nodes and edges based on their respective schema.
Create/Edit a Style
A custom style consists of 3 components:
- Style Name: A descriptive name for the style.
- Node Style: You can add multiple node styles to customize the appearance of different types of nodes.
- Edge Style: You can add multiple edge styles to customize the appearance of different types of nodes.
While all components are optional, it is necessary to configure at least one component to validate the style. Below is the configurations of each Node Style or Edge Style. Please note that any changes made are automatically saved when the style editing panel is closed.
1. Specify which nodes or edges to use this style
These options can be used for both Node Style and Edge Style, unless specified otherwise, to define the targeted nodes or edges:
- When is src/dest: This is available for Node Style only. You can specify that the style should be applied only to nodes that serve as the starting point (src) or ending point (dest) of edges in the graph.
- When Schema in: You can specify that the style should be applied only to nodes or edges of the selected schema(s).
- Property: You can specify that the style should be applied only to nodes or edges with the property values that meet all or one of the required filter groups. Each filter group contains one or more conditions such as [property:
2. Specify the Style
Basic styling for nodes contains:
- Shape: You can select different options for the shape of nodes, including geometric shapes, icons, and images.
- If chose to use images, you should save the image links into the specified node property.
- Color & Size: You can customize the size and color of nodes, as well as the color of their text labels.
- For color customization, you can choose from a color pallet, use a color picker, or specify a node property that contains the color value. The color value can be in the form of HEX (e.g., #333333), RGB (e.g., rgb(100,0,20)) or RGBA (rgba(100,0,20,0.3)).
- Text Label: You can choose whether to display nodes with or without text labels. The label can be the name of the schema and/or the value of a specific node property.
Basic styling for edges is similar to nodes, except that edges do not support shapes. However, you can choose between a solid or dashed line style for the edges.
Advanced styling allows you to set a color or size range for nodes or edges based on the values of a specified numeric property. You can add multiple range styles to capture different value ranges or properties.
3. Re-order the Style Cards
If multiple Node Styles or Edge Styles are created with conflicting styles for the same targeted nodes or edges, the Node or Edge Style that is positioned lower in the order will take precedence over those above it. The ordering of Node Styles and Edge Styles can be changed by dragging and dropping the corresponding cards, allowing you to control the priority and ensure that the desired style is applied to the targeted nodes or edges.
At the top of the style list, there is an option to export all styles in the instance as a .TXT file. This file can then be imported into any other instance, allowing you to easily transfer or backup the styles.
When visualizing query results in Ultipa Manager, the default layout depends on the number of nodes in the results. If the number of nodes is 200 or fewer, the default layout is the Force Directed; if exceeds 200, the default layout is the 3D. Nevertheless, you can manually switch between all available layouts regardless of the number of nodes.
In the force directed layout, nodes have repulsive forces to each other to maintain spacing and prevent overlapping, while edges act as attractive forces, pulling connected nodes closer. Force directed layout iteratively finds a balanced state, resulting in a visually pleasing arrangement of the graph.
The force directed layout naturally reveals the community or cluster structure of the graph by connections. However, it can be computationally expensive, especially for large graphs, due to its iterative nature.
The circular layout places all nodes evenly in a circular ring, with edges drawn as straight lines connecting the nodes.
The circular layout allows for easy identification of central nodes that have dense connections. However, as the number of nodes and edges increases, the circular arrangement may become crowded, making it difficult to maintain clarity and avoid overlapping elements.
The tree layout puts a node at the top as root, with its neighbor nodes branching out layer by layer.
The tree layout effectively represents hierarchical structures, it is ideal for visualizing tree-like data. However, since the root node is determined by the longest path in the query results, some rearrangements might be needed for specific contexts.
The 3D layout represents the query results in a three-dimensional space, adding depth and spatial positioning to nodes and edges.
The third dimension in the 3D layout allows for more efficient use of space, reducing overlap and clutter compared to 2D layouts. The 3D layout offers interactive features that allow users to rotate, zoom, and navigate the graph from different perspectives. However, the perspective and foreshortening effects in the 3D layout can distort the perceived size and distance of nodes, requiring users to be mindful of these distortions when interpreting the layout. Additionally, some stylings applied to nodes and edges in 2D layouts are simplified or overlooked in the 3D layout.
When the query results contain nodes with properties of the point type, the Map view becomes available to display data on a map:
When the query results contain nodes with properties of the timestamp and/or datetime type, the Timeline view becomes available to show how the data evolves over a specific time period: