A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/maxGraph/maxGraph/ below:

maxGraph/maxGraph: maxGraph is a fully client side JavaScript diagramming library

maxGraph is a TypeScript library which can display and allow interaction with vector diagrams. At a high level, it provides:

It provides many of the diagramming features which would be expected by a piece of presentation software like Microsoft® PowerPoint™ or LibreOffice® Impress such as being able to resize, move or rotate nodes, but has a stronger focus on automatic layout algorithms and applications of Graph Theory. It is suited towards software which requires finer-grained customization of functionality than off-the-shelf packages.

The maxGraph library uses no third-party software, it requires no plugins and can be integrated in virtually any framework (it's vanilla JS).

maxGraph is the successor of mxGraph which is now end of life. At first, it provides the same features as mxGraph and adds

New features will follow.

Chrome, Edge, Firefox, Safari, Chromium based browsers (Brave, Opera, ....) for mobile and desktop.

maxGraph is currently under active development, with a few adjustments still required to match the behavior of mxGraph. In the meantime, new features are also being added to enrich the library.

Please try it in your application and submit an issue if you think that something is not working.

You can also test maxGraph by running the Storybook examples or build the npm package locally to get the latest changes.

Install the latest version of maxGraph from the npm registry.

npm

npm install @maxgraph/core

pnpm

yarn

maxGraph is written in TypeScript and provides type definitions for seamless integration into TypeScript applications.

Compatibility of the npm package:

Here is an example that shows how to display a rectangle connected to an orange circle.

This example assumes that

import {type CellStyle, Graph, InternalEvent} from '@maxgraph/core';

const container = <HTMLElement>document.getElementById('graph-container');
// Disables the built-in context menu
InternalEvent.disableContextMenu(container);

const graph = new Graph(container);
graph.setPanning(true); // Use mouse right button for panning

// Adds cells to the model in a single step
graph.batchUpdate(() => {
  const vertex01 = graph.insertVertex({
    position: [10, 10],
    size: [100, 100],
    value: 'rectangle',
  });
  const vertex02 = graph.insertVertex({
    position: [350, 90],
    size: [50, 50],
    style: {
      fillColor: 'orange',
      shape: 'ellipse',
      verticalAlign: 'top',
      verticalLabelPosition: 'bottom',
    },
    value: 'ellipse',
  });
  graph.insertEdge({
    source: vertex01,
    target: vertex02,
    value: 'edge',
    style: {
      edgeStyle: 'orthogonalEdgeStyle',
      rounded: true,
    },
  });
});

You will see something like in the following maxGraph panning demo:

The maxGraph documentation is available on the maxGraph website.

Warning

This is a work in progress, the content will be progressively improved.

For more comprehensive examples than the “Getting started” example, here is a list of demos and examples to help you understand how to use maxGraph and integrate it into your projects.

Note that they are based on maxGraph features, which require the use of CSS and images provided in the npm package.

maxGraph APIs are not fully compatible with mxGraph APIs. The concepts are the same, so experienced mxGraph users should be able to switch from mxGraph to maxGraph without issues.

For a complete guide, see the dedicated migration page.

For usage question, please open a new discussion on GitHub. You can also use GitHub discussions for other topics like maxGraph development or to get the latest news.

For bug reports, feature requests, or other issues, please open a new issue on GitHub.

On 2020-11-09, the development on mxGraph stopped and mxGraph became effectively end of life.

On 2020-11-12, a fork of the mxGraph was created with a call to Contributors.

12 Nov 2020.

If you are interested in becoming a maintainer of mxGraph please comment on issue #1

Initial objectives:

-- Colin Claverie

The project was then renamed on 2021-06-02 into maxGraph due to licensing issue.

Starting from the mxGraph 4.2.2 release, we

Clean former mxGraph tags

Ensure you don't have the former mxGraph tags locally (see #92 fore more details):

git fetch --all --tags --prune
Setting up local development environment

NodeJS requirements:

Note: maxGraph relies on npm workspaces to build.

In the project root directory, execute

To watch the core package, execute:

$ npm run dev -w packages/core

To watch the examples provided as Storybook stories, execute:

$ npm run dev -w packages/html

Since both commands are in watch mode, so it's recommended to open two terminals and run them separately. When a file is saved from the core package, the html storybook will be automatically updated.

For more details about @maxgraph/html, see the README that explains the maxGraph examples.

Building the npm package locally

Reminder: the released version are available at npmjs.

Run

The packages/core folder or the generated packages/core/maxgraph-core-***.tgz file are now ready for use in your application, using npm link or npm install.

Examples of use can be found in the maxgraph-integration-examples repository.

See the dedicated release page.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4