Home
Softono
y

yworks

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
7

Software by yworks

yfiles-for-html-demos
Open Source

yfiles-for-html-demos

# yFiles for HTML Demo Sources This repository contains source code demos that use the commercial [yFiles for HTML](https://www.yfiles.com/) software programming library for the visualization of graphs, diagrams, and networks. The library itself is __*not*__ part of this repository. [![yFiles for HTML Demos](./demo-grid.png)](https://yfiles.com/demos) # Running the Demos Most of the demos are hosted [online here](https://yfiles.com/demos) for everyone to play with. Developers *need* to [evaluate the library](https://www.yworks.com/products/yfiles-for-html/evaluate), instead, since it is __*not*__ part of this repository. The evaluation version also contains these demos and the necessary library to execute the code, so *cloning this repository is neither necessary nor will it suffice*. # Live Online Playground If you want to play with the library withough downloading or signing up to anything, you can play with the API on our [public online playground](https://yfiles.com/play). # License Use of the software hosted in this repository is subject to the license terms of the corresponding yFiles for HTML license. Owners of a valid software license for a yFiles for HTML version that these demos are shipped with are allowed to use the demo source code as basis for their own yFiles for HTML powered applications. Use of such programs is governed by the rights and conditions as set out in the yFiles for HTML license agreement. More details [here](./LICENSE). If in doubt, feel free to [contact](https://www.yworks.com/contact) the yFiles for HTML support team.

Web Components & Widgets Diagramming & Flowcharts
454 Github Stars
react-yfiles-supply-chain
Open Source

react-yfiles-supply-chain

# yFiles React Supply Chain Component [![NPM version](https://img.shields.io/npm/v/@yworks/react-yfiles-supply-chain?style=flat)](https://www.npmjs.org/package/@yworks/react-yfiles-supply-chain) ![Welcome playground](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/react-supply-chain-hero.png) Traditionally associated with manufacturing processes, supply chain management is equally important for the provision of any good or service, whether physical, face-to-face, or purely digital. Managing a supply chain requires visualizing and analyzing all of the components, resources and process in a network. Comprehensively diagramming a supply network enables teams to identify inefficiencies and optimize the overall supply chain. Our powerful and versatile React component based on the [yFiles](https://www.yworks.com/yfiles-overview) library, allows you to seamlessly incorporate dynamic and interactive supply chain diagrams into your applications. This enhances the user experience and facilitates an intuitive exploration of complex manufacturing processes. ## Getting Started ### Prerequisites To use the Supply Chain component, [yFiles for HTML](https://www.yworks.com/products/yfiles-for-html) is required. You can evaluate yFiles for 60 days free of charge on [my.yworks.com](https://my.yworks.com/signup?product=YFILES_HTML_EVAL). See [Licensing](https://docs.yworks.com/react-yfiles-supply-chain/introduction/licensing) for more information on this topic. You can learn how to work with the yFiles npm module in our [Developer’s Guide](https://docs.yworks.com/yfileshtml/#/dguide/yfiles_npm_module). A convenient way of getting access to yFiles is to use the [yFiles Dev Suite](https://www.npmjs.com/package/yfiles-dev-suite). ### Project Setup 1. **Installation** In addition to yFiles, the Supply Chain component requires React to be installed in your project. If you want to start your project from scratch, we recommend using vite: ``` npm create vite@latest my-supply-chain-app -- --template react-ts ``` Add the yFiles dependency: ``` npm install <yFiles package path>/lib-dev/yfiles-<yFiles version>+dev.tgz ``` <details> <summary>Sample <code>package.json</code> dependencies</summary> The resulting package.json dependencies should resemble the following: ```json "dependencies": { "react": "^19.2.0", "react-dom": "^19.2.0", "@yfiles/yfiles": "file:<yFiles package path>/lib-dev/yfiles-<yFiles version>+dev.tgz" } ``` </details> Now, the component itself can be installed: ```bash npm install @yworks/react-yfiles-supply-chain ``` 2. **License** Be sure to invoke the `registerLicense` function before using the Supply Chain React component. When evaluating yFiles, the license JSON file is found in the `lib/` folder of the yFiles for HTML evaluation package. For licensed users, the license data is provided separately. <details> <summary>License registration</summary> Import or paste your license data and register the license, e.g. in `App.tsx`: ```js import yFilesLicense from './license.json' registerLicense(yFilesLicense) ``` </details> 3. **Stylesheet** Make sure to import the CSS stylesheet as well: ```js import '@yworks/react-yfiles-supply-chain/dist/index.css' ``` 4. **Usage** You are now all set to utilize the Supply Chain component with your data! See a basic example `App.tsx` below: ```tsx import { registerLicense, SupplyChain, } from '@yworks/react-yfiles-supply-chain' import '@yworks/react-yfiles-supply-chain/dist/index.css' import yFilesLicense from './license.json' registerLicense(yFilesLicense) const data = { items: [ { name: 'Copper-Ore', id: 1, parentId: 3 }, { name: 'Copper-Plate', id: 2, parentId: 4 }, { name: 'Resource', id: 3 }, { name: 'Material', id: 4 } ], connections: [{ sourceId: 1, targetId: 2 }] } function App() { return <SupplyChain data={data}></SupplyChain> } export default App ``` > **Note:** By default, the `SupplyChain` component adjusts its size to match the size of its parent element. Therefore, it is necessary to set the dimensions of the containing element or apply styling directly to the `SupplyChain` component. This can be achieved by defining a CSS class or applying inline styles. ## Documentation Find the full documentation, API and many code examples in our [documentation](https://docs.yworks.com/react-yfiles-supply-chain). ## Live Playground [![Live Playground](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/welcome-playground.png)](https://docs.yworks.com/react-yfiles-supply-chain/introduction/welcome) Try the yFiles React Supply Chain component directly in your browser with our [playground](https://docs.yworks.com/react-yfiles-supply-chain/introduction/welcome) ## Features The supply chain component provides versatile features that can be adjusted to specific use cases or used with the provided default features. ### Custom node visualization ![Custom node visualization](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/custom-node-visualization.png) The `renderItem` and `renderGroup` property allow providing custom React components for the node visualization. Try the API in the [playground](https://docs.yworks.com/react-yfiles-supply-chain/features/custom-items). ### Custom connection visualization ![Custom connection visualization](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/custom-connection-visualization.png) With the `connectionStyleProvider`, the connection visualization may be adjusted to the use-case. Additionally, the `connectionLabelProvider` may be used to display related information directly on the connection. Try the API in the [playground](https://docs.yworks.com/react-yfiles-supply-chain/features/custom-connections). ### Grouping and folding ![Grouping and folding](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/grouping-and-folding.png) The component automatically creates nested nodes if the item contains a `parentId` property. The nested nodes can be collapsed/expanded interactively. Try the API in the [playground](https://docs.yworks.com/react-yfiles-supply-chain/features/hook-supplychainprovider). ### Heat mapping ![Heat mapping](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/heat-mapping.png) The `heatMapping` function allows to provide a "heat" value for items and connections that visualizes an additional information layer in the component. ### Graph search ![Graph search](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/graph-search.png) The versatile graph search helps to find items in larger supply chains. Try it in the [playground](https://docs.yworks.com/react-yfiles-supply-chain/features/search). ### Custom tooltips ![Custom Tooltips](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/custom-tooltips.png) The `renderTooltip` property can be used to provide use-case specific React components as tooltips. Try the API in the [playground](https://docs.yworks.com/react-yfiles-supply-chain/features/tooltips). ### Graph overview ![Graph overview](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/graph-overview.png) The graph overview provides a quick and easy way to navigate larger graph structures. Try it in the [playground](https://docs.yworks.com/react-yfiles-supply-chain/features/built-in-components). ### Context menu ![Context menu](https://raw.githubusercontent.com/yWorks/react-yfiles-supply-chain/main/assets/context-menu.png) The context menu can be populated with custom components and actions. Try it in the [playground](https://docs.yworks.com/react-yfiles-supply-chain/features/context-menu). ## Licensing All owners of a valid software license for [yFiles for HTML](https://www.yworks.com/products/yfiles-for-html) are allowed to use these sources as the basis for their own [yFiles for HTML](https://www.yworks.com/products/yfiles-for-html) powered applications. Use of such programs is governed by the rights and conditions as set out in the [yFiles for HTML license agreement](https://www.yworks.com/products/yfiles-for-html/sla). You can evaluate yFiles for 60 days free of charge on [my.yworks.com](https://my.yworks.com/signup?product=YFILES_HTML_EVAL). For more information, see the `LICENSE` file. ## Learn More Explore the possibilities of visualizing supply chains and other diagrams with yFiles - the powerful and versatile diagramming SDK. For further information about [yFiles for HTML](https://www.yworks.com/yfiles-overview) and our company, please visit [yWorks.com](https://www.yworks.com). If you are exploring a different use case and require another React component, please take a look at the available [React components](https://www.yworks.com/yfiles-react-components) powered by yFiles! For support or feedback, please reach out to [our support team](https://www.yworks.com/contact) or open an [issue on GitHub](https://github.com/yWorks/react-yfiles-supply-chain/issues). Happy diagramming!

JavaScript Libraries & Components Diagramming & Flowcharts
12 Github Stars
yfiles-graphs-for-streamlit
Open Source

yfiles-graphs-for-streamlit

<p align="center"> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/yfiles-graphs-for-streamlit.svg" alt='yFiles Graphs for Streamlit logo' width="400px" style='max-width: 400px'> </p> [![PyPI - Version](https://img.shields.io/pypi/v/yfiles-graphs-for-streamlit?label=pypi%20package&color=%234c1)](https://pypi.org/project/yfiles-graphs-for-streamlit/) **Streamlit component for displaying and interacting with graph data using [yFiles - the Graph Visualization SDK](https://www.yfiles.com/the-yfiles-sdk).** This component allows you to display and interact with graph data directly within your Streamlit apps. It supports full customization of nodes, edges, layouts, and behaviors, making it suitable for a wide range of graph-based use cases. <p align="center"> <a href="https://www.youtube.com/embed/NhsuNR_tt58"> <img src="https://img.youtube.com/vi/NhsuNR_tt58/maxresdefault.jpg" width="600" alt="Graph Visualization in Streamlit"/> </a> <br> <a href="https://www.youtube.com/embed/NhsuNR_tt58">Watch on YouTube</a> </p> ## Installation The component is available in the Python Package Index. ```bash pip install yfiles_graphs_for_streamlit ```` ## Usage See also [basic-example.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/basic-example.py). ```python import streamlit as st from yfiles_graphs_for_streamlit import StreamlitGraphWidget, Node, Edge nodes = [ Node(id=0, properties={"firstName": "Alpha", "label": "Person A"}), Node(id=1, properties={"firstName": "Bravo", "label": "Person B"}), Node(id=2, properties={"firstName": "Charlie", "label": "Person C", "has_hat": False}), Node(id=3, properties={"firstName": "Delta", "label": "Person D", "likes_pizza": True}) ] edges = [ Edge(start=0, end=1, properties={"since": "1992", "label": "knows"}), Edge(start=1, end=3, properties={"label": "knows", "since": "1992"}), Edge(start=2, end=3, properties={"label": "knows", "since": "1992"}), Edge(start=0, end=2, properties={"label": "knows", "since": 234}) ] StreamlitGraphWidget(nodes, edges).show() ``` ## Feature Highlights <table> <tr> <td> <b>Automatic graph layouts</b><br> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/layouts.png" title="Automatic graph layouts" alt="Automatic graph layouts"> </td> <td> <b>Item neighborhood</b> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/neighborhood.png" title="Item neighborhood" alt="Item neighborhood"> </td> </tr> <tr> <td> <b>Visualize data as heatmap</b> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/mapping.png" title="Visualize data as heatmap" alt="Visualize data as heatmap"> </td> <td> <b>Use geospatial data</b> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/map.png" title="Use geospatial data" alt="Use geospatial data"> </td> </tr> <tr> <td> <b>Data-driven visualization</b> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/little-alchemy.png" title="Data-driven visualization" alt="Data-driven visualization"> </td> <td> <b>Grouping and Folding</b> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/nesting.png" title="Grouping and Folding" alt="Grouping and Folding"> </td> </tr> <tr> <td> <b>Import graph data</b> <img src="https://raw.githubusercontent.com/yWorks/yfiles-graphs-for-streamlit/main/images/import-code.png" title="Import graph data" alt="Import graph data"> </td> </tr> </table> ## Examples You can find example implementations in [/examples](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples). ## Providing Data The nodes / edges lists are required to be lists of `Node`s and `Edge`s. There are only few requirements to the structuring of the provided data: * `nodes: List[Union[Node, Dict[str, Any]]]` * Each node must provide an `id` property * `edges: List[Union[Edge, Dict[str, Any]]]` * Each edge must provide a `start` and `end` property that resolve to the node `id`s to form the graph structure. Optionally, provide additional properties in a `properties` property. You can either use the `Node` and `Edge` dataclasses from `yfiles_graphs_for_streamlit`, or use `dict`s with the required properties. For example, see [basic-example.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/basic-example.py). To map custom properties to visual features, see [Data-driven visualization mappings](#data-driven-visualization-mappings). ### Importing from other graph packages Aside from passing structured data, you can also import from other graph formats: * `from_graph(graph)` * `graph` supports `neo4j`, `graph_tool`, `networkx`, `pygraphviz` and `pandas` dataframes. For details on the different graph importers, see [Graph Importers](https://yworks.github.io/yfiles-jupyter-graphs/03_graph_importers). * Each data-mapping property can also be passed as a keyword argument. Due to type hints, keyword arguments are preferred for defining data mappings. Example usage: ```python from yfiles_graphs_for_streamlit import StreamlitGraphWidget from networkx import erdos_renyi_graph # import other graph packages graph = StreamlitGraphWidget.from_graph(erdos_renyi_graph(10, 0.3, 2)) # create an interactive graph visualization graph.show() ``` ## Constructor The default constructor consumes structured node and edge lists, see [Providing Data](#providing-data) for structural requirements. Alternatively, use the `from_graph` constructor to import from other graph formats ([Importing from other graph packages](#importing-from-other-graph-packages)). Each data-mapping property can also be passed as a keyword argument to the constructor or `from_graph()`. Due to type hints, keyword arguments are preferred for defining data mappings. ## Rendering the Component Call `show()` to render the component in a streamlit file. There are optional arguments with which the embedding can be adjusted: | Argument | Type | Description | Default | |------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------| | `directed` | `bool` | Whether the edges should show a direction indicator. | `True` | | `graph_layout` | `Layout` | Can be used to specify a general default automatic layout. See [Layout](#layout). | `Layout.ORGANIC` | | `sync_selection` | `bool` | Whether the component returns the lists of interactively selected nodes and edges. Enabling this may require caching the component to avoid excessive rerendering. | `False` | | `sidebar` | `dict` | Sidebar options: `{enabled, start_with}`. `start_with` may be one of `'Neighborhood'`, `'Data'`, `'Search'`, `'About'` | `{'enabled': False}` | | `neighborhood` | `dict` | `{max_distance, selected_nodes}` to filter neighbors. | `{'max_distance': 1, 'selected_nodes': []}` | | `overview` | `bool` | Whether the overview is expanded | `True` | | `key` | `str` | Streamlit's optional unique identifier that defines the component's stable identity and state across reruns. Use a fixed key to preserve the state between reruns. If omitted, Streamlit assigns an implicit key based on the call location and code execution path. Changing the key recreates the component with a fresh state. | `None` | The return value of `show()` is a tuple of node and edge lists that are interactively selected. The returned lists are only updated when `sync_selection` is set to `True`. For example, see [selection.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/selection.py). ## Data-driven Visualization Mappings You can adjust the graph visualization on an item basis by providing the following mapping functions. Each mapping is passed the original data object of your original node / edge data, and you need to return a mapping specific dict or value to that is reflected in the graph visualization. To return to the default behavior, simply assign `None` to the mapping. ### Property Mappings Specify what data should be put on the items and therefore be considered by the other data mappings * `node_property_mapping: Optional[Union[str, Callable[[dict], dict]]]` * `edge_property_mapping: Optional[Union[str, Callable[[dict], dict]]]` By default, the origin dict for each item is returned. ### Label Mappings Specify the visualized text on each item. * `node_label_mapping: Optional[Union[str, Callable[[dict], Union[str, LabelStyle]]]]` * `edge_label_mapping: Optional[Union[str, Callable[[dict], Union[str, LabelStyle]]]]` Returning a string will first be resolved against the `properties` of the item's dict and if there is no such property key the value is used as-is. Alternatively, return a `LabelStyle` object with the following properties to have full control over the item's text. #### `LabelStyle` * `font: Font`: The font used for the label. * `text: string`: The text that is added to the item. * `font_size: int`: The text size. * `font_weight: FontWeight`: The font weight. See [FontWeight](#fontweight). * `color: string`: The text color. * `background_color: string`: A color string that is used as the label's background. * `position: LabelPosition`: Where the label is placed relatively to the node. See [LabelPosition](#labelposition). * `maximum_width: int`: The maximum width of the label. By default, the label is clipped at the given size, or wrapped when `wrapping` is set. * `maximum_height: int`: The maximum height of the label. Clips the label at the given height. May be combined with `wrapping`. * `wrapping: TextWrapping`: Text wrapping for the label. Must be set in combination with `maximum_width`. See [TextWrapping](#textwrapping). * `text_alignment: TextAlignment`: The horizontal text alignment when `wrapping` is enabled. See [TextAlignment](#textalignment). For example, see [data-mapping.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/data-mapping.py). ### Color Mappings Specify the color of each item. * `node_color_mapping: Optional[Union[str, Callable[[dict], str]]]` * `edge_color_mapping: Optional[Union[str, Callable[[dict], str]]]` Return any CSS color value (e.g., a color constant, a hex value, a rgb string, etc.). For example, see [data-mapping.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/data-mapping.py). ### Item Visualization Mappings Specify the visualization properties of nodes and edges. * `node_styles_mapping: Optional[Union[str, Callable[[dict], NodeStyle]]]` * Available node properties on `NodeStyle`: * `color`: CSS color value * `image`: URL or data URL of the image * `shape`: `NodeShape` enum, see [NodeShape](#nodeshape) * `edge_styles_mapping: Optional[Union[str, Callable[[dict], EdgeStyle]]]` * Available edge properties on `EdgeStyle`: * `color`: `str` (a CSS color value) * `directed`: `bool` * `thickness`: `float` * `dash_style`: `DashStyle` (see [DashStyle](#dashstyle)) or a dashing string like `'5 10'` or `'5, 10'` * `edge_thickness_factor_mapping: Optional[Union[str, Callable[[dict], float]]]` * Controls the thickness of the edges with a factor that is multiplied to its base size. * `directed_mapping: Optional[Union[str, Callable[[dict], bool]]]` * Allows specifying which edge should be visualized with direction (indicated by an arrow). For example, see [data-mapping.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/data-mapping.py). ### Geometry Mappings Specify the location and/or size of nodes. Note that the location of an item is overwritten from an automatic layout, unless the `no_layout` option is used. * `node_scale_factor_mapping: Optional[Union[str, Callable[[dict], float]]]` * Controls the node size with a factor that is multiplied to its base size. * `node_size_mapping: Optional[Union[str, Callable[[int, dict], float]]]` * Controls the node size by width and height by returning a tuple `(width, height)`. * `node_position_mapping: Optional[Union[str, Callable[[dict], Tuple[float, float]]]]` * Controls the position of the node by returning a tuple: `(x, y)`. * `node_layout_mapping: Optional[Union[str, Callable[[dict], Tuple[float, float, float, float]]]]` * Controls the bounding box of the nodes (position and size) by returning a 4-tuple: `(x, y, width, height)`. For example, see [data-mapping.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/data-mapping.py). ### Geospatial Mapping Specify a geo-coordinate for the nodes that is used by the geospatial layout option. * `node_coordinate_mapping: Optional[Union[str, Callable[[dict], Tuple[float, float]]]]` * The mapping is supposed to return a tuple of `(latitude, longitude)`. For example, see [geodata.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/geodata.py). ### Hierarchy Mappings Specify which nodes should be grouped together. * `node_parent_mapping: Optional[Union[str, Callable[[dict], Union[str, int, float]]]]` * This mapping does not create new group nodes and just resolves the mapped id against the given dataset. It should be used when the group nodes are already **part of** the given dataset. * It should return an id for each given node object which is then used as parent group node for this child node. If the parent node does not existing in the dataset, no grouping is created. * `node_parent_group_mapping: Optional[Union[str, Callable[[dict], Union[str, dict]]]]` * This mapping always creates new group nodes based on the given mapping. It should be used when the group nodes are **not part of** the given dataset. * The returned value must either be a `str` which is used as label and id for the new group node (i.e. nodes with the same mapped `str` are grouped together), or it must be a dict with a mandatory `label` property (return same labels for different nodes defines the group for these nodes) and optional more key-value pairs that are added as properties to the group. These additional properties are also considered when resolving other node mappings (e.g. for the styling of group nodes). * Example Snippets ```python StreamlitGraphWidget( nodes=airports, edges=flight_paths, # Assuming each node has a "country" property, group all nodes with the same "country" into groups, # labeled with the value of the "country" property. node_parent_group_mapping="country" ).show() ``` ```python StreamlitGraphWidget( nodes=airports, edges=flight_paths, # Assuming each node has a "country" property, group all nodes with the same "country" into groups, # and assign additional properties to group nodes that can be mapped e.g. by node_styles_mapping. node_parent_group_mapping=lambda node: {'label': node['properties']['country'], 'color': '#9F4499', 'char_count': len(node['properties']['country'])} ).show() ``` For example, see [grouping.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/grouping.py). ### Fine-tuning automatic layouts Some mappings affect specific automatic layouts * `node_type_mapping: Optional[Union[str, Callable[[dict], str]]]` * Assign a specific "type" string to each item. This affects most of the automatic layouts such that same types are placed adjacent to each other, if possible. * `node_cell_mapping: Optional[Union[str, Callable[[dict], Tuple[int, int]]]]` * Assign a cell tuple `(row, column)` to each node. This information is considered by the hierarchical layout and helps to fine-tune the result, for example, to highlight specific structures of the graph or to convey critical information. ### Heat Mapping Numeric values on nodes and edges may be visualized as a heatmap overlay on the graph visualization. * `heat_mapping: Optional[Union[str, Callable[[dict], float]]]` * The returned heat needs to be normalized in-between `0` and `1`. For example, see [geodata.py](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/examples/geodata.py). ## Enums The enums can be imported from `yfiles_graphs_for_streamlit`. ### `Layout` | Enum | Description | |---------------------------------|------------------------------------------------------------------------------------------------------------| | `Layout.CIRCULAR` | Arranges nodes in singly cycle and bundles edge paths. | | `Layout.CIRCULAR_STRAIGHT_LINE` | Arranges nodes in singly cycle and uses straight-line edge paths. | | `Layout.HIERARCHIC` | Organizes nodes in hierarchical layers to emphasize directional flow. | | `Layout.ORGANIC` | Uses a force-directed algorithm to create a natural, free-form network layout. | | `Layout.INTERACTIVE_ORGANIC` | Similar to `ORGANIC` but dynamically adjusts the layout as the user interacts with it. | | `Layout.ORTHOGONAL` | Positions nodes on a grid with right-angled edges for clear, structured diagrams. | | `Layout.RADIAL` | Places a central node in the middle and arranges others in rings around it to show hierarchy or influence. | | `Layout.TREE` | Displays nodes in a branching tree structure from a defined root node. | | `Layout.MAP` | Uses user-defined geo-coordinates to place the nodes on a world map | | `Layout.ORTHOGONAL_EDGE_ROUTER` | Reroutes edges at right angles to minimize overlap and improve readability. | | `Layout.ORGANIC_EDGE_ROUTER` | Smoothly routes edges around obstacles in a natural, curved manner. | | `Layout.NO_LAYOUT` | Leaves node positions unchanged without applying any automatic layout. | ### `NodeShape` | Enum | Description | |-----------------------------|-----------------------------------------------------------------------------------------------------------------| | `NodeShape.ELLIPSE` | An elliptical shape. | | `NodeShape.HEXAGON` | A 6-sided polygon where the top and bottom edges are aligned with the top and bottom edges of the bounding box. | | `NodeShape.HEXAGON2` | A 6-sided polygon where the left and right edges are aligned with the left and right edges of the bounding box. | | `NodeShape.OCTAGON` | An 8-sided polygon where the edges are aligned with the edges of the bounding box. | | `NodeShape.PILL` | A stadium shape with the shorter sides rounded. | | `NodeShape.RECTANGLE` | A rectangular shape. | | `NodeShape.ROUND_RECTANGLE` | A rectangular shape with rounded corners. | | `NodeShape.TRIANGLE` | A triangular shape that points to the top. | ### `DashStyle` | Enum | Description | |-----------------------------|---------------------------------------| | `DashStyle.SOLID` | Solid line style. | | `DashStyle.DASH` | Dashed line style. | | `DashStyle.DOT` | Dotted line style. | | `DashStyle.DASH_DOT` | Single dash and dot line style | | `DashStyle.DASH_DOT_DOT` | A single dash and two dots line style | ### `FontWeight` | Enum | Description | |----------------------|-------------| | `FontWeight.BOLD` | 'bold' | | `FontWeight.BOLDER` | 'bolder' | | `FontWeight.NORMAL` | 'normal' | | `FontWeight.LIGHTER` | 'lighter' | ### `TextAlignment` Only affects multiline texts. | Enum | Description | |------------------------|--------------------------------| | `TextAlignment.CENTER` | Center aligned multiline text. | | `TextAlignment.LEFT` | Left aligned multiline text. | | `TextAlignment.RIGHT` | right aligned multiline text. | ### `TextWrapping` Is only in effect when `maximum_width` is specified on `LabelStyle`. | Enum | Description | |-----------------------------------|--------------------------------------------------------------------------| | `TextWrapping.CHARACTER` | Character wrapping at `maximum_width` . | | `TextWrapping.CHARACTER_ELLIPSIS` | Character wrapping at `maximum_width` with ellipsis at `maximum_height`. | | `TextWrapping.WORD` | Word wrapping at `maximum_width`. | | `TextWrapping.WORD_ELLIPSIS` | Word wrapping at `maximum_width` with ellipsis at `maximum_height`. | | `TextWrapping.NONE` | The text is not wrapped, nor clipped. | ### `LabelPosition` | Enum | Description | |------------------------|------------------------------------------------------------| | `LabelPosition.CENTER` | Places the label in the center of the node (interior). | | `LabelPosition.NORTH` | Places the label above the node (exterior). | | `LabelPosition.EAST` | Places the label on the right side of the node (exterior). | | `LabelPosition.SOUTH` | Places the label below the node (exterior). | | `LabelPosition.WEST` | Places the label on the left side of the node (exterior). | ## Code of Conduct This project and everyone participating in it is governed by the [Code of Conduct](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]). ## Feedback This component is by no means perfect. If you find something is not working as expected we are glad to receive an issue report from you. Please make sure to [search for existing issues](https://github.com/yWorks/yfiles-graphs-for-streamlit/search?q=is%3Aissue+repo%3AyWorks%2Fyfiles-graphs-for-streamlit&type=issues) first and check if the issue is not an unsupported feature or known issue. If you did not find anything related, report a new issue with necessary information. Please also provide a clear and descriptive title and stick to the issue templates. See [issues](https://github.com/yWorks/yfiles-graphs-for-streamlit/issues). ## Dependencies The following dependencies are bundled with the component (see also [THIRD-PARTY-NOTICES.json](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/THIRD-PARTY-NOTICES.json)). - [streamlit-component-lib](https://www.npmjs.com/package/streamlit-component-lib) ## Third-Party Libraries Used at Runtime Additionally, the following libraries are used at runtime of the component (see also [THIRD-PARTY-NOTICES-RUNTIME.json](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/THIRD-PARTY-NOTICES-RUNTIME.json)). - [@ctrl/tinycolor](https://github.com/scttcper/tinycolor) - [@mdi/js](https://github.com/Templarian/MaterialDesign-JS) - [@sentry/browser](https://www.npmjs.com/package/@sentry/browser) - [leaflet](https://leafletjs.com/) - [Matomo JS](https://github.com/matomo-org/matomo/tree/5.4.0/js) - [Vue](https://vuejs.org/) - [vue-json-viewer](https://github.com/chenfengjw163/vue-json-viewer) ## License See [LICENSE](https://github.com/yWorks/yfiles-graphs-for-streamlit/blob/main/LICENSE.md) file.

Diagramming & Flowcharts Data Visualisation
21 Github Stars
yfiles-for-java-swing-demos
Open Source

yfiles-for-java-swing-demos

# yFiles for Java (Swing) Programming Samples This repository contains source code demos and tutorials that use the commercial [yFiles for Java (Swing)](https://www.yfiles.com/the-yfiles-sdk/java/yfiles-for-java) software programming library for the visualization of graphs, diagrams, and networks. The library itself is __*not*__ part of this repository. [![yFiles for HTML](./demo-grid.png)](https://live.yworks.com/yfiles-for-html) # Running the Demos For most of these demos equivalent ones based on [yFiles for HTML](https://www.yfiles.com/the-yfiles-sdk/web/yfiles-for-html) are hosted [online here](https://live.yworks.com/demos/index.html) for everyone to play with. Developers should [evaluate the library](https://my.yworks.com/signup?product=YFILES_JAVA_EVAL), instead. The evaluation version also contains these demos and the necessary library to execute the code. ## [Showcase Demos](demos/showcase/) This folder and its subfolders contain demo applications which focus on the diagramming aspect and show how graph visualization helps in the context of a specific use-case. | Demo | Description | |------|-------------| |[LayoutStyles](demos/showcase/layoutstyles/)| Play with the most used layout algorithms of yFiles. | |[BPMNEditor](demos/showcase/bpmn/)| Business Process Diagram sample application. | |[OrgChart](demos/showcase/orgchart/)| View and manipulate an organization chart. | |[IsometricDrawing](demos/showcase/isometricdrawing/)| Displays graphs in an isometric fashion to create an impression of a 3-dimensional view. | |[Uml](demos/showcase/uml/)| Interactive creation and editing of UML class diagrams. | |[TagCloud](demos/showcase/tagcloud/)| Shows how to create a Tag Cloud visualization. | |[LogicGates](demos/showcase/logicgates/)| An editor for networks of logic gates with dedicated ports for incoming and outgoing connections. | |[GraphAnalysis](demos/showcase/graphanalysis/)| Algorithms to analyse the structure of a graph in yFiles for Java (Swing). | |[LargeGraphs](demos/showcase/largegraphs/)| Improve the rendering performance for very large graphs in yFiles for Java (Swing). | |[LargeGraphAggregation](demos/showcase/largegraphaggregation/)| A demo showing smart node aggregation for drill-down exploration of large graphs. | |[Neighborhood](demos/showcase/neighborhood/)| Shows how to display the neighborhood of a selected node. | |[ChordDiagram](demos/showcase/chorddiagram/)| Shows how to create a chord diagram. | ## [Layout Demos](demos/layout/) This folder and its subfolders contain demo applications which make use of the different layout algorithms of the layout component of yFiles for Java (Swing). | Demo | Description | |------|-------------| |[Sankey](demos/layout/sankey/)| Shows how to produce a Sankey diagram by means of the hierarchical layout. | |[TreeMap](demos/layout/treemap/)| Shows disk usage of a directory tree with the Tree Map layout. | |[HierarchicalNesting](demos/layout/hierarchicalnesting/)| Shows how to nicely expand and collapse sub-graphs organized in group. | |[FoldingWithLayout](demos/layout/foldingwithlayout/)| Shows how to automatically trigger a layout that clears or fills the space when opening or closing groups. | |[EdgeBundling](demos/layout/edgebundling/)| Shows how edge bundling can be applied for reducing visual cluttering in dense graphs. | |[ArcDiagram](demos/layout/arcdiagram/)| Shows how to arrange and visualize a graph as an arc diagram. | |[MazeRouting](demos/layout/mazerouting/)| Shows how the EdgeRouter can be used for finding routes through a maze. | |[EdgeLabelPlacement](demos/layout/edgelabelplacement/)| Shows how to place edge labels at the preferred location with a labeling algorithm. | |[NodeLabeling](demos/layout/nodelabeling/)| Show how to use GenericLabeling to set the positions of labels. | |[NodeTypes](demos/layout/nodetypes/)| Shows how different layout algorithms handle nodes with types. | |[InteractiveHierarchical](demos/layout/interactivehierarchical/)| Shows how to enable the sketch mode of the hierarchical layout. | |[InteractiveEdgerouting](demos/layout/interactiveedgerouting/)| Show EdgeRouter's ability to find and re-layout edge paths which are not yet ‘good’. | |[EdgeGrouping](demos/layout/edgegrouping/)| Shows the effects of edge and port grouping when arranging graphs with Hierarchical Layout. | |[EdgeRouterGrouping](demos/layout/edgeroutergrouping/)| Shows how to configure edge and port grouping using the EdgeRouter. | |[OrganicSubstructures](demos/layout/organicsubstructureslayout/)| Shows how OrganicLayout handles substructures and node types. | |[FillAreaLayout](demos/layout/fillarealayout/)| Shows how to fill free space in the graph after deleting nodes. | |[ClearAreaMarquee](demos/layout/clearmarqueearea/)| Shows how to interactively move graph elements around a marquee rectangle in a given graph layout so that the modifications in the graph are minimal. | |[NodeAlignment](demos/layout/nodealignment/)| Shows how to automatically align nodes in rows and columns using the AlignmentStage layout algorithm. | |[HierarchicalGridComponents](demos/layout/hierarchicalgridcomponents/)| Shows how to obtain compact arrangement using grid components in the hierarchical layout. | |[HierarchicalSubcomponents](demos/layout/hierarchicalsubcomponents/)| Shows how hierarchical layout can arrange selected subcomponents of a graph with different layout styles. | |[TabularGroups](demos/layout/tabulargroups/)| Shows how to configure the tabular groups of the Hierarchical Layout. | |[CriticalPaths](demos/layout/criticalpaths/)| Shows how to emphazise important paths with hierarchical and tree layout algorithms. | |[CustomLayoutStage](demos/layout/customlayoutstage/)| Show how to implement a custom layout stage. | |[SplitEdges](demos/layout/splitedges/)| Shows how to align edges at group nodes using RecursiveGroupLayout together with HierarchicalLayout. | |[LayoutGrid](demos/layout/layoutgrid/)| Shows the usage of a LayoutGrid for hierarchical and organic layout calculations. | |[SimpleLayoutGrid](demos/layout/simplelayoutgrid/)| Shows how to create a simple LayoutGrid. | |[InteractiveOrganicLayout](demos/layout/interactiveorganic/)| Shows how to use the InteractiveOrganicLayout for organic layout in interactive environments. | |[TreeLayout](demos/layout/treelayout/)| Shows the tree layout style and the different ways in which this layout can arrange a node and its children. | |[PartialLayout](demos/layout/partiallayout/)| Shows how to arrange some elements in a graph while keeping other elements fixed. | |[PortAlignment](demos/layout/portalignment/)| Shows how to implement port alignment in HierarchicalLayout. | |[LayoutWithoutView](demos/layout/withoutview/)| Shows how to create a graph, run a graph analysis algorithm, and calculate a layout without using a view or the IGraph API. | ## [View Demos](demos/view/) This folder and its subfolders contain demo applications which make use of the different features of the viewer component of yFiles for Java (Swing). | Demo | Description | |------|-------------| |[GanttChart](demos/view/ganttchart/)| Shows how to create a "Gantt chart" with yFiles for Java (Swing). | |[CollapsibleTree](demos/view/collapsibletree/)| Interactively collapse and expand subgraphs. | |[GraphEditor](demos/view/grapheditor/)| A graph editor which demonstrates the editing features of yFiles for Java (Swing). | |[GraphViewer](demos/view/graphviewer/)| Showcase of different kinds of graphs created with yFiles for Java (Swing). | |[RenderingOrder](demos/view/renderingorder/)| Shows the effect of different rendering policies to the model items. | |[ArrangeObjects](demos/view/arrangeobjects/)| Shows simple operations for aligning and distributing nodes | |[Bridges](demos/view/bridges/)| Showcases the capabilities of the BridgeManager class for inserting bridges into edge paths. | |[EdgeToEdge](demos/view/edgetoedge/)| Shows edge-to-edge connections. | |[ImageExport](demos/view/imageexport/)| Export a graph as a bitmap image. | |[SVGImageExport](demos/view/svgimageexport/)| Export a graph as a SVG image. | |[Printing](demos/view/printing/)| Print a graph by using the yFiles CanvasPrintable. | |[EventsViewer](demos/view/eventsviewer/)| Explore the different kinds of events dispatched by yFiles for Java (Swing). | |[Clipboard](demos/view/clipboard/)| Shows different ways of using GraphClipboard for Copy and Paste operations. | |[GraphMLCompatibility](demos/view/graphmlcompatibility/)| A demo that shows how to enable backwards compatibility for reading *GraphML* files from version 3.x. | ## [Integration Demos](demos/integration/) This folder and its subfolders contain demo applications which illustrate the integration of yFiles for Java with different GUI frameworks. | Demo | Description | |------|-------------| |[Neo4j](demos/integration/neo4j/)| Demo application that shows how to integrate Neo4j into yFiles for Java (Swing). | |[JavaFXApplication](demos/integration/javafx/)| Integrate yFiles for Java (Swing) in a JavaFX application. | ## [Analysis Demos](demos/analysis/) This folder and its subfolders contain demo applications which demonstrate some of the graph analysis algorithms available in yFiles for Java (Swing). | Demo | Description | |------|-------------| |[CriticalPathAnalysis](demos/analysis/criticalpathanalysis/)| Shows how to perform critical path analysis (CPA). | |[NetworkFlows](demos/analysis/networkflows/)| Usage and visualization of network flow algorithms in yFiles for Java (Swing). | ## [Application Feature Demos](demos/applicationfeatures/) This folder and its subfolders contain demo applications which make use of the different features of yFiles for Java (Swing). | Demo | Description | |------|-------------| |[AggregateGraphWrapper](demos/applicationfeatures/interactiveaggregation/)| Analyzing a graph by aggregating groups of nodes. | |[TableEditor](demos/applicationfeatures/tableeditor/)| Interactive creation and editing of tables. | |[RotatableNodes](demos/applicationfeatures/rotatablenodes/)| Shows how support for rotated node visualizations can be implemented on top of the yFiles library. | |[SimpleDragAndDrop](demos/applicationfeatures/simpledraganddrop/)| Enable and customize the drag-and-drop support for nodes, labels and ports. | |[BackgroundImage](demos/applicationfeatures/backgroundimage/)| Demonstrates interactive orthogonal edge editing where edges remain orthogonal during creation and manipulation. | |[Filtering](demos/applicationfeatures/filtering/)| Demonstrates how to hide and show graph items without changing the original graph. | |[FilteringWithFolding](demos/applicationfeatures/filteringwithfolding/)| Demonstrates how to combine filtering and folding in the same application. | |[Folding](demos/applicationfeatures/folding/)| Shows how to collapse and expand group nodes. | |[FoldingWithMergedEdges](demos/applicationfeatures/foldingwithmergededges/)| Illustrates collapsing and expanding group nodes while merging their edges. | |[GraphCopy](demos/applicationfeatures/graphcopy/)| Shows how to copy a graph or sub graph. | |[GraphDecorator](demos/applicationfeatures/graphdecorator/)| Shows how to highlight a node or an edge when the mouse hovers over the said node or edge. | |[SimpleHighlightDecorator](demos/applicationfeatures/simplehighlightdecorator/)| Shows how to highlight a node or an edge when the mouse hovers over the said node or edge. | |[ComplexHighlightDecorator](demos/applicationfeatures/complexhighlightdecorator/)| Highlights nodes on hover, adapting the highlight shape to match data stored in each node's tag. | |[GraphSearch](demos/applicationfeatures/graphsearch/)| Demonstrates interactive orthogonal edge editing where edges remain orthogonal during creation and manipulation. | |[GridSnapping](demos/applicationfeatures/gridsnapping/)| Shows the grid snapping feature which enables snapping graph items to grid points. | |[SaveAndLoadGraphML](demos/applicationfeatures/inputoutput/)| Shows how to use *GraphML input and output* . | |[CustomGraphML](demos/applicationfeatures/customgraphml/)| Shows how to read and write custom data bound to graph elements to and from a GraphML file. | |[LabelTextWrapping](demos/applicationfeatures/labeltextwrapping/)| Shows how to enable the text wrapping and trimming feature provided by the LabelStyle class. | |[OrthogonalEdgeEditing](demos/applicationfeatures/orthogonaledgeediting/)| Demonstrates interactive orthogonal edge editing where edges remain orthogonal during creation and manipulation. | |[RectangularIndicator](demos/applicationfeatures/rectangularindicator/)| Demonstrates how to apply a rectangular indicator to a graph. | |[SmartClickNavigation](demos/applicationfeatures/smartclicknavigation/)| Demonstrates smart zooming and highlighting when clicking nodes or edges in large graphs. | |[Snapping](demos/applicationfeatures/snapping/)| Enables snapping (guide lines) for graph elements using *GraphSnapContext* . | |[SubdivideEdges](demos/applicationfeatures/subdivideedges/)| Shows how to use a custom NodeDropInputMode for dragging nodes from a separate panel onto an edge. | |[Theming](demos/applicationfeatures/theming/)| Shows how to add an overview component that controls the main canvas. | |[Tooltips](demos/applicationfeatures/tooltips/)| Shows how to enable tooltips for graph items. | |[OverviewComponent](demos/applicationfeatures/overview/)| Shows how to add an overview component that controls the main canvas. | |[FlowFiltering](demos/applicationfeatures/flowfiltering/)| Demonstrates how to dynamically show or hide items in the upstream or downstream flow of a selected node. | ## [Input Demos](demos/input/) This folder and its subfolders contain demo applications which use and customize the graph editing features provided by yFiles for Java (Swing). | Demo | Description | |------|-------------| |[LensInputMode](demos/input/magnifyingglass/)| Shows how to use a specialized LensInputMode to display the part of the graph the pointer is hovering over in a kind of magnifying glass. | |[Valid Begin Cursor](demos/input/validbegincursors/)| Shows how GraphComponent updates the mouse cursor to reflect the action that can start at the current location. | |[Interactive Graph Structuring](demos/input/interactivegraphrestructuring/)| Shows how a graph can be restructured interactively by dragging subtrees. | |[Custom Edge Creation](demos/input/customedgecreation/)| Shows how to provide directional ports and port candidates and demonstrates several customizations for the edge creation gesture. | |[Node Selection Resizing](demos/input/nodeselectionresizing/)| Shows how to implement a single set of reshape-handles for multiple selected nodes. | |[BorderAlignedLabelModel](demos/input/borderalignedlabelmodel/)| Shows how to implement a custom node label model to position labels around the circumference of a node. | |[Offset Wrapper Label Model Demo](demos/input/offsetwrapperlabelmodel/)| Learn how to add an adjustable offset to labels produced by another label model. | |[CustomPortModel](demos/input/customportlocationmodel/)| Customize port location model. | |[CustomSnapping](demos/input/customsnapping/)| Enable and customize the snapping behavior of graph items. | |[PopupMenu](demos/input/popupmenu/)| Enable and customize context menus for nodes and for the canvas background. | |[DragAndDrop](demos/input/draganddrop/)| Enable and customize the drag-and-drop support for nodes, labels and ports. | |[EdgeReconnection](demos/input/edgereconnection/)| Enable and customize the reconnection behavior of edges. | |[Label Editing ](demos/input/labelediting/)| Shows customizations of interactive label editing, including validation, instant typing, and custom helpers. | |[Custom Handle Provider](demos/input/customhandleprovider/)| Shows how to implement custom handles and an IHandleProvider. | |[LabelHandleProvider](demos/input/labelhandleprovider/)| Enable interactive rotating and resizing labels. | |[Move Unselected Nodes ](demos/input/moveunselectednodes/)| Shows how the move unselected items input mode can be constrained, e.g. with keys or custom hit testing. | |[OrthogonalEdges](demos/input/orthogonaledgeeditingcustomization/)| Enable and customize orthogonal edge editing. | |[PortCandidateProvider](demos/input/portcandidateprovider/)| Customize the ports at which edges connect to nodes. | |[PositionHandler](demos/input/positionhandler/)| Customize the movement behavior of nodes. | |[ReparentHandler](demos/input/reparenthandler/)| Customize the re-parenting behavior of nodes. | |[ReshapeHandleProviderConfiguration](demos/input/reshapehandleproviderconfiguration/)| Customize the reshape behavior of nodes. | |[ReshapeHandleProvider](demos/input/reshapehandleprovider/)| Implements a custom `IReshapeHandleProvider` . | |[Restricted Editing](demos/input/restrictedediting/)| Demonstrates how to toggle interactive editing capabilities while still using GraphEditorInputMode for selection. | |[Lasso Selection](demos/input/lassoselection/)| Select graph elements by drawing a lasso. | |[Marquee Node Creation ](demos/input/marqueenodecreation/)| Shows how to use MarqueeSelectionInputMode to create new nodes. | |[Mouse Wheel Customization ](demos/input/mousewheelcustomization/)| Shows how to customize the mouse wheel behavior. | |[SingleSelection](demos/input/singleselection/)| Configure the `GraphEditorInputMode` for single selection mode. | |[SizeConstraintProvider](demos/input/sizeconstraintprovider/)| Customize the resizing behavior of nodes. | |[CircleSnapping](demos/input/circlesnapping/)| Shows how to configure snapping in a way that is suited to circular/radial arrangements of child nodes around parent nodes. | |[Hyperlink](demos/input/hyperlink/)| Add hyperlink support to HTML formatted labels. | ## [Style Demos](demos/style/) This folder and its subfolders contain demo applications which make use of the different features of the styles component of yFiles for Java (Swing). | Demo | Description | |------|-------------| |[LabelStyle](demos/style/labelstyle/)| Shows the most important configuration options for the built-in LabelStyle class. | |[RectangleNodeStyle](demos/style/rectanglenodestyle/)| Implement sophisticated styles for graph objects in yFiles for Java (Swing). | |[ShapeNodeStyle](demos/style/shapenodestyle/)| Implement sophisticated styles for graph objects in yFiles for Java (Swing). | |[ShapePortStyle](demos/style/shapeportstyle/)| Shows the main features of ShapePortStyle and its supported port shapes. | |[GroupNodeStyle](demos/style/groupnodestyle/)| Implement sophisticated styles for graph objects in yFiles for Java (Swing). | |[Arrow](demos/style/arrow/)| Shows how to customize arrows on edges. | |[ArrowNodeStyle](demos/style/arrownodestyle/)| Implement sophisticated styles for graph objects in yFiles for Java (Swing). | |[ArrowEdgeStyle](demos/style/arrowedgestyle/)| Shows how to customize arrows on edges. | |[CustomStyle](demos/style/customstyle/)| Implement sophisticated styles for graph objects in yFiles for Java (Swing). | |[SVGNodeStyle](demos/style/svgnodestyle/)| Demonstrates SVG node visualizations. | |[ThemeVariants](demos/style/themevariants/)| Shows various interaction visualization simultaneously | |[EditablePathNodeStyle](demos/style/editablepathnodestyle/)| Illustrates interactive editing of general path node styles. | |[ClickableStyleDecorator](demos/style/clickablestyledecorator/)| Shows how to handle mouse clicks in specific areas of a node's visualization. | |[CompositeNodeStyle](demos/style/compositenodestyle/)| Shows how to combine several node styles into one. | |[LevelOfDetail](demos/style/levelofdetail/)| Demonstrates how to change the level of detail when zooming in and out. | |[HTMLLabelStyle](demos/style/htmllabelstyle/)| Shows how to use HtmlLabelStyle for rendering HTML-formatted labels. | |[ZoomInvariantLabelStyle](demos/style/zoominvariantlabelstyle/)| Demonstrates zoom-invariant label rendering. | |[SimpleArrowStyle](demos/style/simplearrowstyle/)| Shows how to create a simple custom arrow for edges. | |[SelectionStyling](demos/style/selectionstyling/)| Shows customized selection painting of nodes, edges and labels by decorating these items with a corresponding style. | |[StyleDecorators](demos/style/styledecorators/)| Shows how to create styles for nodes, edges, and labels. | |[GeneralPathNodeStyle](demos/style/generalpathnodestyle/)| Shows how to create a variety of star, polygon, and other custom node styles arrows on edges. | |[JComponentStyle](demos/style/jcomponentstyle/)| Arbitrary Swing components incorporated as graph elements. | ## [Data Binding Demos](demos/databinding/) Demonstrates how to create a graph from different data formats using the `GraphBuilder` , `TreeBuilder` and `AdjacencyGraphBuilder` classes in yFiles for Java (Swing). | Demo | Description | |------|-------------| |[GraphBuilder](demos/databinding/graphbuilderxml/)| Show how to generate a graph with GraphBuilder from XML-based data. | |[TreeBuilderXML](demos/databinding/treebuilderxml/)| Show how to generate a graph from XML-based business data using TreeBuilder. | |[AdjacencyGraphBuilder](demos/databinding/adjacencygraphbuilder/)| Show how to generate a graph with AdjacencyGraphBuilder from list-based data. | |[AdjacencyGraphBuilderWithIds](demos/databinding/adjacencygraphbuilderwithids/)| Show how to generate a graph with AdjacencyGraphBuilder from list-based data where each node has a unique ID. | |[GraphBuilderImplicitGroups](demos/databinding/graphbuilderimplicitgroups/)| Show how to generate a graph from list-based business data with implicit group references using GraphBuilder. | |[TreeBuilderIterable](demos/databinding/treebuilderiterable/)| Show how to generate a graph from list-based business data using TreeBuilder. | ## [yFiles for Java (Swing) Tutorials](demos/tutorials/) This series of tutorials provides a comprehensive introduction to the fundamental concepts and features of yFiles for Java Swing. It covers a wide range of topics, from basic graph manipulation to advanced customization and data binding. The tutorials include: * yFiles Basic Features Tutorial : An introduction to the basic concepts of yFiles, including graph element creation, viewport management, styles, labels, interaction, undo/redo, grouping, data binding, layout, and analysis. * Graph Builder Tutorial : Shows how to use the [GraphBuilder](https://docs.yworks.com/yfilesjava/doc/api/#/api/com.yworks.yfiles.graph.builder.GraphBuilder) to automatically create and update graphs from arbitrary data sources. * Node Style Implementation Tutorial : Guides you through the process of creating custom node styles, covering rendering, performance optimization, data handling, hit-testing, and edge cropping. * Edge Style Implementation Tutorial : Demonstrates how to create custom visualizations for edges, including polyline rendering, arrows, bridges, and performance consideration. * Label Style Implementation Tutorial : Explores the creation of custom label styles, ranging from basic text rendering to complex, multi-line labels with custom shapes. Each tutorial consists of several steps that build upon each other, providing a solid foundation for developing sophisticated graph-based applications. | Demo | Description | |------|-------------| |[yFiles Basic Features Tutorial](demos/tutorials/basicfeatures/)| An introduction to the basic concepts of yFiles for Java (Swing). | |[Graph Builder Tutorial](demos/tutorials/graphbuilder/)| Shows how to use the GraphBuilder to create graphs from custom data sources. | |[Custom Node Style Tutorial](demos/tutorials/styleimplementationnode/)| Shows how to implement custom node styles using the yFiles for Java (Swing) API. | |[Custom Label Style Tutorial](demos/tutorials/styleimplementationlabel/)| Shows how to implement custom label styles using the yFiles for Java (Swing) API. | |[Custom Edge Style Tutorial](demos/tutorials/styleimplementationedge/)| Shows how to implement custom edge styles using the yFiles for Java (Swing) API. | ## [Layout Feature Demos](demos/layoutfeatures/) This folder and its subfolders contain demo applications which make use of the different layout features of yFiles for Java (Swing). | Demo | Description | |------|-------------| |[Hierarchical Layout](demos/layoutfeatures/hierarchical/)| This demo showcases common configuration options for the Hierarchical Layout algorithm. | |[Incremental Hierarchical Layout](demos/layoutfeatures/hierarchicalincremental/)| Shows how to run the HierarchicalLayout algorithm on a predefined subset of nodes. | |[Hierarchical Node Port Candidates](demos/layoutfeatures/hierarchicalnodeportcandidates/)| Demonstrates how to run a HierarchicalLayout with a configured set of NodePortCandidates. | |[Hierarchical Edge Grouping](demos/layoutfeatures/hierarchicaledgegrouping/)| Demonstrates how to run a HierarchicalLayout with edge grouping. | |[Hierarchical Given Layering](demos/layoutfeatures/hierarchicalgivenlayering/)| Demonstrates how to run a HierarchicalLayout with given layering. | |[Hierarchical Constraints](demos/layoutfeatures/hierarchicalconstraints/)| Demonstrates how to run a HierarchicalLayout with configured constraints. | |[Hierarchical Sequence Constraints](demos/layoutfeatures/hierarchicalsequenceconstraints/)| Demonstrates how to run a HierarchicalLayout with configured sequence constraints. | |[Hierarchical Layer Constraints](demos/layoutfeatures/hierarchicallayerconstraints/)| Shows how to customize the assignment of nodes to layers when using HierarchicalLayout. | |[Hierarchical Node Alignment](demos/layoutfeatures/hierarchicalnodealignment/)| Demonstrates how to align nodes connected by critical paths in a hierarchical layout. | |[Hierarchical Edge Labeling](demos/layoutfeatures/hierarchicaledgelabeling/)| Shows how to configure the HierarchicalLayout for automatic edge label placements. | |[Hierarchical Compact Groups](demos/layoutfeatures/hierarchicalcompactgroups/)| Demonstrates how to configure a left-to-right hierarchical layout with compact group nodes. | |[Organic Layout](demos/layoutfeatures/organic/)| Shows basic configuration options for the Organic Layout algorithm. | |[Incremental Organic Layout](demos/layoutfeatures/organicincremental/)| Shows how to run the organic layout algorithm on a predefined subset of nodes in a graph. | |[Organic Edge Labeling](demos/layoutfeatures/organicedgelabeling/)| Shows how to configure organic layout for automatic edge label placement. | |[Organic Substructures](demos/layoutfeatures/organicsubstructures/)| Shows the ability of OrganicLayout to consider substructures in the graph. | |[Organic Constraints](demos/layoutfeatures/organicconstraints/)| Shows how to use supplemental layout data to enforce placement constraints when using OrganicLayout. | |[EdgeRouter](demos/layoutfeatures/edgerouter/)| Shows how to configure the EdgeRouter algorithm. | |[Incremental Edge Router](demos/layoutfeatures/edgerouterincremental/)| Shows how to run the edge router algorithm on a predefined subset of edges in a graph. | |[BusStyleEdgeRouting](demos/layoutfeatures/edgerouterbuses/)| Shows how to prepare the EdgeRouter for orthogonal bus-style routes. | |[Edge Router Buses (Custom)](demos/layoutfeatures/edgerouterbusescustom/)| Shows how to configure the EdgeRouter to generate orthogonal bus-style routes with manually defined backbone points. | |[Tree Layout](demos/layoutfeatures/tree/)| Shows how to use the Tree layout algorithm to arrange trees. | |[Tree Node Placers](demos/layoutfeatures/treenodeplacers/)| Shows how to use the Tree layout algorithm to arrange trees with different node placers. | |[Orthogonal Layout](demos/layoutfeatures/orthogonal/)| Shows basic configuration options for the OrthogonalLayout algorithm. | |[Recursive Group Layout](demos/layoutfeatures/recursivegrouplayout/)| Shows how to apply a specific layout algorithm to the contents of each group node. | |[Radial Group](demos/layoutfeatures/radialgroup/)| Shows how to arrange grouped graphs using a radial layout. | |[Compact Disk Layout for Group Content](demos/layoutfeatures/compactdiskgroups/)| Arrange circular group contents compactly with Compact Disk Layout. | |[Compact Tabular Layout](demos/layoutfeatures/compacttabularlayout/)| Shows how to configure the TabularLayout algorithm to create compact drawings. | # License Use of the software hosted in this repository is subject to the license terms of the corresponding yFiles for Java (Swing) license. Owners of a valid software license for a yFiles for Java (Swing) version that these demos are shipped with are allowed to use the demo source code as basis for their own yFiles for Java (Swing) powered applications. Use of such programs is governed by the rights and conditions as set out in the yFiles for Java (Swing) license agreement. More details [here](./LICENSE). If in doubt, feel free to [contact](https://www.yworks.com/contact) the yFiles for Java (Swing) support team.

Developer Tools Diagramming & Flowcharts
17 Github Stars
ontology-visualizer
Open Source

ontology-visualizer

# Ontology Visualizer ![A screenshot of this sample application](doc/screenshot.png) This repository contains the sample application for the yFiles use case about an [Ontology Visualizer](https://www.yworks.com/use-case/visualizing-an-ontology). The app displays a sample ontology diagram that you can explore. ## See also - [Watch the introductory video](https://player.vimeo.com/video/389490579) of this app - [Read the article](https://www.yworks.com/use-case/visualizing-an-ontology) about an _Ontology Visualizer_ - [Learn more about yFiles](https://www.yworks.com/products/yfiles), the software library for visualizing, editing, and analyzing graphs If you have any questions or suggestions, email us at [[email protected]](mailto:[email protected]) or call [+49 7071 9709050](tel:+4970719709050). ## How to run this app You need a copy of the [yFiles for HTML](https://www.yworks.com/products/yfiles-for-html) diagramming library in order to run this application. You can download a free test version of yFiles in the [yWorks Customer Center](https://my.yworks.com/signup?product=YFILES_HTML_EVAL). Checkout this project, then extract the yFiles for HTML package to a directory next to it, e.g.: ``` documents |-- ontology-visualizer |-- yFiles-for-HTML-Complete-3.0-Evaluation ``` Afterward, enter the `ontology-visualizer` directory and run the usual commands ``` npm install ``` followed by ``` npm run load-data npm run start-server npm run dev ``` ## About This application is powered by [yFiles for HTML](https://www.yworks.com/products/yfiles-for-html), the powerful diagramming library. Turn your data into clear diagrams with the help of unequaled automatic diagram layout, use rich visualizations for your diagram elements, and give your users an intuitive interface for smooth interaction. You can learn more about the many features that come with yFiles on the [yFiles Features Overview](https://www.yworks.com/products/yfiles/features). If you want to try it for yourself, obtain a free test version of yFiles in the [yWorks Customer Center](https://my.yworks.com/signup?product=YFILES_HTML_EVAL). ## Contact If you have any questions or suggestions, email us at [[email protected]](mailto:[email protected]) or call [+49 7071 9709050](tel:+4970719709050). ## Data The app shows data from [DBpedia](http://dbpedia.org/ontology/) ## License The MIT License (MIT) Copyright (c) yWorks GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Knowledge Bases & RAG Diagramming & Flowcharts
14 Github Stars
yfiles-for-wpf-demos
Open Source

yfiles-for-wpf-demos

# yFiles for WPF Demo Sources This repository contains source code demos that use the commercial [yFiles for WPF](https://www.yworks.com/products/yfiles-wpf) software programming library for the visualization of graphs, diagrams, and networks. The library itself is __*not*__ part of this repository. [![yFiles for WPF Demos](./demo-grid.png)](https://live.yworks.com/yfiles-for-html) # Running the Demos For most of these demos equivalent ones based on [yFiles for HTML](https://www.yworks.com/yfileshtml) are hosted [online here](https://live.yworks.com/yfiles-for-html) for everyone to play with. Developers should [evaluate the library](https://www.yworks.com/products/yfiles-wpf/evaluate), instead. The evaluation version also contains these demos and the necessary library to execute the code. # License Use of the software hosted in this repository is subject to the license terms of the corresponding yFiles for WPF license. Owners of a valid software license for a yFiles for WPF version that these demos are shipped with are allowed to use the demo source code as basis for their own yFiles for WPF-powered applications. Use of such programs is governed by the rights and conditions as set out in the yFiles for WPF license agreement. More details [here](./LICENSE). If in doubt, feel free to [contact](https://www.yworks.com/contact) the yFiles for WPF support team.

Developer Tools Diagramming & Flowcharts
11 Github Stars
yfiles-for-javafx-demos
Open Source

yfiles-for-javafx-demos

# yFiles for JavaFX Programming Samples This repository contains source code demos and tutorials that use the commercial [yFiles for JavaFX](https://www.yworks.com/yfilesjavafx) software programming library for the visualization of graphs, diagrams, and networks. The library itself is __*not*__ part of this repository. [![yFiles for HTML Demos](./demo-grid.png)](https://live.yworks.com/yfiles-for-html) # Running the Demos For most of these demos equivalent ones based on [yFiles for HTML](https://www.yworks.com/yfileshtml) are hosted [online here](https://live.yworks.com/yfiles-for-html) for everyone to play with. Developers should [evaluate the library](https://www.yworks.com/products/yfiles-for-javafx/evaluate), instead. The evaluation version also contains these demos and the necessary library to execute the code. ## [Complete Demos](demos/src/complete/) This folder and its subfolders contain demo applications which make use of the different features of yFiles for JavaFX. | Demo | Description | |------|-------------| |[SimpleEditor](demos/src/complete/simpleeditor/)| Shows a graph editor which demonstrates the editing features of yFiles for JavaFX. | |[OrgChart](demos/src/complete/orgchart/)| View and manipulate an organization chart. | |[RotatableNodes](demos/src/complete/rotatablenodes/)| Shows how support for rotated node visualizations can be implemented on top of the yFiles library. | |[AggregateGraphWrapper](demos/src/complete/aggregategraphwrapper/)| Shows how to analyze a graph by __aggregating groups of nodes__ . | |[CollapsibleTree](demos/src/complete/collapse/)| Interactively collapse and expand subgraphs. | |[IsometricDrawing](demos/src/complete/isometric/)| Displays graphs in an isometric fashion to create an impression of a 3-dimensional view. | |[LogicGate](demos/src/complete/logicgate/)| An editor for networks of logic gates with dedicated ports for incoming and outgoing connections. | |[BpmnEditor](demos/src/complete/bpmn/)| Create and edit Business Process Diagrams. | |[HierarchicGrouping](demos/src/complete/hierarchicgrouping/)| Organize subgraphs in groups and folders and interactively expand and collapse them. | |[TableEditor](demos/src/complete/tableeditor/)| Interactive editing of tables using TableEditorInputMode. | ## [Layout Demos](demos/src/layout/) This folder and its subfolders contain demo applications which make use of the different layout algorithms of the layout component of yFiles for JavaFX. | Demo | Description | |------|-------------| |[LayoutStyles](demos/src/layout/layoutstyles/)| Play with the most used layout algorithms of yFiles. | |[HierarchicLayout](demos/src/layout/hierarchiclayout/)| Showcase of one of our central layout algorithms, the HierarchicLayout. | |[InteractiveOrganicLayout](demos/src/layout/interactiveorganic/)| Use InteractiveOrganicLayout for organic layout in interactive environments. | |[FamilyTree](demos/src/layout/familytree/)| This demo shows how genealogical graphs (family trees) can be visualized. | |[MarqueeClearAreaLayout](demos/src/layout/cleararea/)| Shows how to interactively move graph elements around a marquee rectangle in a given graph layout so that the modifications in the graph are minimal. | |[CriticalPaths](demos/src/layout/criticalpaths/)| This demo shows how to emphazise important paths with hierarchic and tree layout algorithms. | |[EdgeBundling](demos/src/layout/edgebundling/)| Demonstrates edge bundling for different layout styles. | |[EdgeGrouping](demos/src/layout/edgegrouping/)| Shows the effects of edge and port grouping when arranging graphs with HierarchicLayout. | |[FillAreaAfterDeletion](demos/src/layout/fillarea/)| Shows howto fill free space in the graph after deleting nodes. | |[NodeTypes](demos/src/layout/nodetypes/)| A demo that shows how different layout algorithms handle nodes with types. | |[OrganicSubstructures](demos/src/layout/organicsubstructures/)| Shows how [OrganicLayout](http://docs.yworks.com/yfilesjavafx/doc/api/#/api/com.yworks.yfiles.layout.organic.OrganicLayout) handles substructures and node types. | |[PartialLayout](demos/src/layout/partiallayout/)| Shows how to arrange some elements in a graph while keeping other elements fixed. | |[PartitionGrid](demos/src/layout/partitiongrid/)| Demonstrates the usage of a `PartitionGrid` for hierarchic and organic layout calculations. | |[Sankey](demos/src/layout/sankey/)| Uses Hierarchic Layout to arrange Sankey diagrams. | |[SplitEdges](demos/src/layout/splitedges/)| Shows how to align edges at group nodes using RecursiveGroupLayout together with HierarchicLayout. | |[TreeLayout](demos/src/layout/treelayout/)| Demonstrates the tree layout style and the different ways in which this layout can arrange a node and its children. | |[TreeMap](demos/src/layout/treemap/)| Shows disk usage of a directory tree with the Tree Map layout. | ## [Input Demos](demos/src/input/) This folder and its subfolders contain demo applications which demonstrate how to use and customize the graph editing features provided by yFiles for JavaFX. | Demo | Description | |------|-------------| |[CustomLabelModel](demos/src/input/customlabelmodel/)| Customize label placement model. | |[CustomPortModel](demos/src/input/customportmodel/)| Customize port location model. | |[ContextMenu](demos/src/input/contextmenu/)| Create a context menu for graph items and manage it. | |[CustomSnapping](demos/src/input/customsnapping/)| This demo shows how to customize `SnapLine` behaviour. | |[DragAndDrop](demos/src/input/draganddrop/)| Shows the drag and drop support provided by yFiles for JavaFX. | |[EdgeReconnectionPortCandidateProvider](demos/src/input/edgereconnection/)| Demo code that shows how to customize the reconnection behavior for existing edges. | |[LabelHandleProvider](demos/src/input/labelhandleprovider/)| Enable interactive rotating and resizing labels. | |[LensInputMode](demos/src/input/lensinputmode/)| This demo shows how to use a specialized LensInputMode to display the part of the graph the pointer is hovering over in a kind of magnifying glass. | |[OrthogonalEdges](demos/src/input/orthogonaledges/)| Customize orthogonal edge editing. | |[PortCandidateProvider](demos/src/input/portcandidateprovider/)| Customize the ports at which edges connect to nodes. | |[PositionHandler](demos/src/input/positionhandler/)| Demo code that shows how to customize the movement behavior of `INode` s. | |[ReparentHandler](demos/src/input/reparenthandler/)| Demo code that shows how to customize the reparent gesture in a grouped graph. | |[ReshapeHandleProvider](demos/src/input/reshapehandleprovider/)| Implements a custom `IReshapeHandleProvider` . | |[ReshapeHandleProviderConfiguration](demos/src/input/reshapehandleproviderconfiguration/)| Customize the reshape behavior of nodes. | |[SingleSelection](demos/src/input/singleselection/)| Configure the `GraphEditorInputMode` for single selection mode. | |[SizeConstraintProvider](demos/src/input/sizeconstraintprovider/)| Demo code that shows how to customize the resizing behavior of `INode` s. | ## [Integration Demos](demos/src/integration/) This folder and its subfolders contain demo applications which illustrate the integration of yFiles for JavaFX with different GUI frameworks as well as integration of external libraries into yFiles for JavaFX. | Demo | Description | |------|-------------| |[EclipseRCP](demos/src-eclipsercp/integration/eclipsercp/)| Demo application that shows how to integrate yFiles for JavaFX in an Eclipse E4 RCP. | |[Neo4j](demos/src-neo4j/integration/neo4j/)| Demo application that shows how to integrate Neo4j into yFiles for JavaFX. | |[SwtDemo](demos/src-swt/integration/swt/)| Demo application that shows how to integrate yFiles for JavaFX in a Standard Widget Toolkit (SWT) application. | |[SwingDemo](demos/src/integration/swing/)| Demo application that shows how to integrate yFiles for JavaFX in a Swing application. | ## [Viewer Demos](demos/src/viewer/) This folder and its subfolders contain demo applications which make use of the different features of the viewer component of yFiles for JavaFX. | Demo | Description | |------|-------------| |[Css](demos/src/viewer/css/)| Shows the possibilities to customize the visualizations in yFiles for JavaFX with the help of CSS. | |[SVGImageExport](demos/src-svg/viewer/svgimageexport/)| Export a graph as a SVG image. | |[BackgroundImage](demos/src/viewer/backgroundimage/)| Shows how to add background visualizations to a graph control. | |[ClickableStyleDecorator](demos/src/viewer/clickablestyledecorator/)| Shows how to handle mouse clicks in specific areas of a node's visualization. | |[EdgeToEdge](demos/src/viewer/edgetoedge/)| Shows edge-to-edge connections. | |[GraphEvents](demos/src/viewer/events/)| Explore the different kinds of events dispatched by yFiles for JavaFX. | |[Filtering](demos/src/viewer/filtering/)| Shows how to temporarily remove nodes or edges from the graph. | |[FilteringWithFolding](demos/src/viewer/filteringandfolding/)| Shows how to combine yFiles [filtering](https://docs.yworks.com/yfilesjavafx/doc/api/#/dguide/filtering) and [folding](https://docs.yworks.com/yfilesjavafx/doc/api/#/dguide/folding) features. | |[Folding](demos/src/viewer/folding/)| Shows how to use yFiles [folding](https://docs.yworks.com/yfilesjavafx/doc/api/#/dguide/folding) feature. | |[GanttChartDemo](demos/src/viewer/ganttchart/)| Shows how to create a "Gantt chart" with yFiles for JavaFX. | |[GraphCopy](demos/src/viewer/graphcopy/)| Shows how to copy a graph or sub graph. | |[GraphViewer](demos/src/viewer/graphviewer/)| A viewer which demonstrates different kinds of graphs created with yFiles for JavaFX. | |[GridSnapping](demos/src/viewer/gridsnapping/)| Demonstrates how to enable grid snapping functionality for graph elements. | |[ImageExport](demos/src/viewer/imageexport/)| Export a graph as a bitmap image. | |[LargeGraphs](demos/src/viewer/largegraphs/)| Improve the rendering performance for very large graphs in yFiles for JavaFX. | |[LevelOfDetail](demos/src/viewer/levelofdetail/)| Demonstrates how to change the level of detail when zooming in and out. | |[Printing](demos/src/viewer/printing/)| Print the contents of a yFiles GraphControl. | |[RenderingOrder](demos/src/viewer/renderingorder/)| Shows the effect of different rendering policies to the model items. | |[SmartClickNavigation](demos/src/viewer/smartclicknavigation/)| Demonstrates how to navigate in a large graph. | |[Snapping](demos/src/viewer/snapping/)| Demonstrates how to enable snapping functionality for graph elements. | |[Tooltips](demos/src/viewer/tooltips/)| Demonstrates how to add tooltips to graph items. | ## [Style Demos](demos/src/style/) This folder and its subfolders contain demo applications which make use of the different features of the styles component of yFiles for JavaFX. | Demo | Description | |------|-------------| |[ArrowNodeStyle](demos/src/style/arrownodestyle/)| Implement sophisticated styles for graph objects in yFiles for JavaFX. | |[CompositeNodeStyle](demos/src/style/compositenodestyle/)| This demo shows how to combine several node styles into one. | |[DefaultLabelStyle](demos/src/style/defaultlabelstyle/)| Shows the most important configuration options for the built-in DefaultLabelStyle class. | |[GroupNodeStyle](demos/src/style/groupnodestyle/)| Implement sophisticated styles for graph objects in yFiles for JavaFX. | |[RectangleNodeStyle](demos/src/style/rectanglenodestyle/)| Implement sophisticated styles for graph objects in yFiles for JavaFX. | |[RichTextLabelStyle](demos/src/style/richtextlabelstyle/)| Using the JavaFX 8 Rich Text API in yFiles. | |[ShapeNodeStyle](demos/src/style/shapenodestyle/)| Implement sophisticated styles for graph objects in yFiles for JavaFX. | |[SimpleCustomStyle](demos/src/style/simplecustomstyle/)| Shows how to implement sophisticated styles for graph objects in yFiles for JavaFX. | |[TemplateStyle](demos/src/style/templatestyle/)| Shows how to use `TemplateNodeStyle` and `TemplateLabelStyle` to create complex node and label visualizations using FXML components. | |[TextWrapping](demos/src/style/textwrapping/)| Shows how to use the text wrapping and overrun style feature provided by the `DefaultLabelStyle` class. | |[ZoomInvariantLabelStyleDemo](demos/src/style/zoominvariantlabelstyle/)| Demonstrates zoom-invariant label rendering. | ## [Graph Builder Demos](demos/src/builder/) This folder and its subfolders contain demo applications which demonstrate how to use the `GraphBuilder` classes for binding graph elements to business data in yFiles for JavaFX. | Demo | Description | |------|-------------| |[GraphBuilder](demos/src/builder/graphbuilder/)| Demonstrates creating a graph using the `GraphBuilder` class. | |[InteractiveNodesGraphBuilder](demos/src/builder/interactivenodesgraphbuilder/)| Demonstrates creating a graph using class `AdjacentNodesGraphBuilder` . | ## [Analysis Demos](demos/src/analysis/) This folder and its subfolders contain demo applications which demonstrate some of the graph analysis algorithms available in yFiles for JavaFX. | Demo | Description | |------|-------------| |[GraphAnalysis](demos/src/analysis/graphanalysis/)| Algorithms to analyse the structure of a graph in yFiles for JavaFX. | |[ShortestPath](demos/src/analysis/shortestpath/)| Usage and visualization of shortest path algorithms in yFiles for JavaFX. | |[NetworkFlows](demos/src/analysis/networkflows/)| Usage and visualization of network flow algorithms in yFiles for JavaFX. | ## [Deployment Demos](demos/src/deploy/) This folder and its subfolders contain demo applications which illustrate tasks for deployment of yFiles for JavaFX applications, e.g. obfuscation. | Demo | Description | |------|-------------| |[GradleDemo](demos/src-gradle/deploy/gradledemo/)| Demonstrates how to set up a basic yFiles for JavaFX project using Gradle. | |[MavenDemo](demos/src-maven/deploy/mavendemo/)| Demonstrates howto set up a basic yFiles for JavaFX project using Apache Maven. | |[ObfuscationDemo](demos/src/deploy/obfuscation/)| Demonstrates the obfuscation of an yFiles for JavaFX application via yGuard. | # Tutorials The yFiles for JavaFX tutorials are extensive source code samples that present the functionality of the yFiles for JavaFX library. To navigate to a specific tutorial, just follow the corresponding link from the table below. ## Available Tutorials | Category | Description | |----------|-------------| |[Getting Started](./demos/src/tutorial01_GettingStarted/)| Introduces basic concepts as well as main features like custom styles, full user interaction, Undo/Redo, clipboard, I/O, grouping and folding.| |[Custom Styles](./demos/src/tutorial02_CustomStyles/)| A step-by-step guide to customizing the visual representation of graph elements. This tutorial is intended for users who want to learn how to create custom styles from scratch.| # License Use of the software hosted in this repository is subject to the license terms of the corresponding yFiles for JavaFX license. Owners of a valid software license for a yFiles for JavaFX version that these demos are shipped with are allowed to use the demo source code as basis for their own yFiles for JavaFX powered applications. Use of such programs is governed by the rights and conditions as set out in the yFiles for JavaFX license agreement. More details [here](./LICENSE). If in doubt, feel free to [contact](https://www.yworks.com/contact) the yFiles for JavaFX support team.

Developer Tools Diagramming & Flowcharts
11 Github Stars