Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.

License

NotificationsYou must be signed in to change notification settings

NorthwoodsSoftware/GoJS

Repository files navigation

GoJS is a JavaScript and TypeScript library for creating and manipulating diagrams, charts, and graphs.

npmopen issueslast commitdownloadsTwitter Follow

See GoJS Samples

Get Started with GoJS

GoJS is a flexible library that can be used to create a number of different kinds of interactive diagrams,including data visualizations, drawing tools, and graph editors.There are samples forflowchart,org chart,business process BPMN,swimlanes,timelines,state charts,kanban,network,mindmap,sankey,family trees andgenogram charts,fishbone diagrams,floor plans,UML,decision trees,PERT charts,Gantt, andhundreds more.GoJS includes a number of built in layouts including tree layout, force directed, circular, and layered digraph layout,and many custom layout extensions and examples.

GoJS is renders either to an HTML Canvas element (with export to SVG or image formats) or directly as SVG DOM.GoJS can run in a web browser, or server side inNode orPuppeteer.GoJS Diagrams are backed by Models, with saving and loading typically via JSON-formatted text.

Read more about GoJS atgojs.net

TheGitHub repository and theGoJS website contain not only the library,but also the sources for all samples, extensions, and documentation.

However thenpm package contains only the library.You can install the GoJS library using npm:

$ npm install gojs

The samples, extensions, and documentation can be installed by running:

$ npm create gojs-kit

You can use the GitHub repository to quicklysearch through all of the sources.

Minimal Sample

Diagrams are built by creating one or more templates, with desired properties data-bound, and adding model data.

<divid="myDiagramDiv"style="width:400px; height:200px;"></div><scriptsrc="https://cdn.jsdelivr.net/npm/gojs"></script><script>constmyDiagram=newgo.Diagram('myDiagramDiv',{// create a Diagram for the HTML Div element'undoManager.isEnabled':true// enable undo & redo});// define a simple Node template// the Shape will automatically surround the TextBlockmyDiagram.nodeTemplate=newgo.Node('Auto').add(// add a Shape and a TextBlock to this "Auto" Panelnewgo.Shape('RoundedRectangle',{strokeWidth:0,fill:'white'})// no border; default fill is white.bind('fill','color'),// Shape.fill is bound to Node.data.colornewgo.TextBlock({margin:8,font:'bold 14px sans-serif',stroke:'#333'})// some room around the text.bind('text','key')// TextBlock.text is bound to Node.data.key);// but use the default Link template, by not setting Diagram.linkTemplate// create the model data that will be represented by Nodes and LinksmyDiagram.model=newgo.GraphLinksModel([{key:'Alpha',color:'lightblue'},{key:'Beta',color:'orange'},{key:'Gamma',color:'lightgreen'},{key:'Delta',color:'pink'}],[{from:'Alpha',to:'Beta'},{from:'Alpha',to:'Gamma'},{from:'Beta',to:'Beta'},{from:'Gamma',to:'Delta'},{from:'Delta',to:'Alpha'}]);</script>

The above diagram and model code creates the following graph.The user can now click on nodes or links to select them, copy-and-paste them, drag them, delete them, scroll, pan, and zoom, with a mouse or with fingers.

Click the above image to see the interactive GoJS Diagram

Support

Northwoods Software offers a month of free developer-to-developer support for GoJS to prospective customers so you can finish your project faster.

Read and search the officialGoJS forum for any topics related to your questions.

Posting in the forum is the fastest and most effective way of obtaining support for any GoJS related inquiries.Please register for support at Northwoods Software'sregistration form before posting in the forum.

For any nontechnical questions about GoJS, such as about sales or licensing,please visit Northwoods Software'scontact form.

License

The GoJSsoftware license.

The GoJSevaluation license.

Copyright Northwoods Software Corporation


[8]ページ先頭

©2009-2025 Movatter.jp