Skip to content

Commit cd79484

Browse files
committed
3.0.0
1 parent 6876649 commit cd79484

File tree

1,333 files changed

+291066
-358279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,333 files changed

+291066
-358279
lines changed

README.html

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<h1>GoJS, a JavaScript Library for HTML Diagrams</h1>
2+
<img align="right" height="150" src="https://www.nwoods.com/images/go.png">
3+
<p><a href="https://gojs.net">GoJS</a> is a JavaScript and TypeScript library for creating and manipulating diagrams, charts, and graphs.</p>
4+
<p><a href="https://www.npmjs.com/package/gojs"><img src="https://img.shields.io/github/release/NorthwoodsSoftware/GoJS.svg" alt="npm"></a>
5+
<a href="https://github.com/NorthwoodsSoftware/GoJS/issues"><img src="https://img.shields.io/github/issues-raw/NorthwoodsSoftware/GoJS.svg" alt="open issues"></a>
6+
<a href="https://github.com/NorthwoodsSoftware/GoJS/commits/master"><img src="https://img.shields.io/github/last-commit/NorthwoodsSoftware/GoJS.svg" alt="last commit"></a>
7+
<a href="https://www.npmjs.com/package/gojs"><img src="https://img.shields.io/npm/dw/gojs.svg" alt="downloads"></a>
8+
<a href="https://twitter.com/NorthwoodsGo"><img src="https://img.shields.io/twitter/follow/NorthwoodsGo.svg?style=social&amp;label=Follow" alt="Twitter Follow"></a></p>
9+
<p><a href="https://gojs.net/latest/samples">See GoJS Samples</a></p>
10+
<p><a href="https://gojs.net/latest/learn">Get Started with GoJS</a></p>
11+
<p>GoJS is a flexible library that can be used to create a number of different kinds of interactive diagrams,
12+
including data visualizations, drawing tools, and graph editors.
13+
There are samples for
14+
<a href="https://gojs.net/latest/samples/flowchart.html">flowchart</a>,
15+
<a href="https://gojs.net/latest/samples/orgChartEditor.html">org chart</a>,
16+
<a href="https://gojs.net/latest/samples/bpmn/BPMN.html">business process BPMN</a>,
17+
<a href="https://gojs.net/latest/samples/swimlanes.html">swimlanes</a>,
18+
<a href="https://gojs.net/latest/samples/timeline.html">timelines</a>,
19+
<a href="https://gojs.net/latest/samples/statechart.html">state charts</a>,
20+
<a href="https://gojs.net/latest/samples/kanban.html">kanban</a>,
21+
<a href="https://gojs.net/latest/samples/network.html">network</a>,
22+
<a href="https://gojs.net/latest/samples/mindMap.html">mindmap</a>,
23+
<a href="https://gojs.net/latest/samples/sankey.html">sankey</a>,
24+
<a href="https://gojs.net/latest/samples/familyTree.html">family trees</a> and <a href="https://gojs.net/latest/samples/genogram.html">genogram charts</a>,
25+
<a href="https://gojs.net/latest/samples/Fishbone.html">fishbone diagrams</a>,
26+
<a href="https://gojs.net/latest/samples/floorplannerTS/index.html">floor plans</a>,
27+
<a href="https://gojs.net/latest/samples/umlClass.html">UML</a>,
28+
<a href="https://gojs.net/latest/samples/decisionTree.html">decision trees</a>,
29+
<a href="https://gojs.net/latest/samples/PERT.html">PERT charts</a>,
30+
<a href="https://gojs.net/latest/samples/gantt.html">Gantt</a>, and
31+
<a href="https://gojs.net/latest/samples/index.html">hundreds more</a>.
32+
GoJS includes a number of built in layouts including tree layout, force directed, circular, and layered digraph layout,
33+
and many custom layout extensions and examples.</p>
34+
<p>GoJS is renders either to an HTML Canvas element (with export to SVG or image formats) or directly as SVG DOM.
35+
GoJS can run in a web browser, or server side in <a href="https://nodejs.org/en/">Node</a> or <a href="https://github.com/GoogleChrome/puppeteer">Puppeteer</a>.
36+
GoJS Diagrams are backed by Models, with saving and loading typically via JSON-formatted text.</p>
37+
<p><a href="https://gojs.net/latest/samples/index.html"><img src="https://raw.githubusercontent.com/NorthwoodsSoftware/GoJS/master/.github/github-970x354.png"></a></p>
38+
<p>Read more about GoJS at <a href="https://gojs.net">gojs.net</a></p>
39+
<p>This repository contains only the library.
40+
The sources for all samples, extensions, and documentation can be installed by running:</p>
41+
<pre><code class="language-html">$ npm create gojs-kit
42+
</code></pre>
43+
<p>You can use the GitHub repository to quickly <a href="https://github.com/NorthwoodsSoftware/GoJS-Samples/search?q=setDataProperty&amp;type=Code">search through all of the sources</a>.</p>
44+
<h2>Minimal Sample</h2>
45+
<p>Graphs are constructed by creating one or more templates, with desired properties data-bound, and adding model data.</p>
46+
<pre><code class="language-html">&lt;div id=&quot;myDiagramDiv&quot; style=&quot;width:400px; height:150px;&quot;&gt;&lt;/div&gt;
47+
48+
&lt;script src=&quot;https://unpkg.com/gojs&quot;&gt;&lt;/script&gt;
49+
50+
&lt;script&gt;
51+
const myDiagram =
52+
new go.Diagram(&quot;myDiagramDiv&quot;, // create a Diagram for the HTML Div element
53+
{ &quot;undoManager.isEnabled&quot;: true }); // enable undo &amp; redo
54+
55+
// define a simple Node template
56+
myDiagram.nodeTemplate =
57+
new go.Node(&quot;Auto&quot;) // the Shape will automatically surround the TextBlock
58+
// add a Shape and a TextBlock to this &quot;Auto&quot; Panel
59+
.add(new go.Shape(&quot;RoundedRectangle&quot;,
60+
{ strokeWidth: 0, fill: &quot;white&quot; }) // no border; default fill is white
61+
.bind(&quot;fill&quot;, &quot;color&quot;)) // Shape.fill is bound to Node.data.color
62+
.add(new go.TextBlock({ margin: 8, stroke: &quot;#333&quot; }) // some room around the text
63+
.bind(&quot;text&quot;, &quot;key&quot;)); // TextBlock.text is bound to Node.data.key
64+
65+
// but use the default Link template, by not setting Diagram.linkTemplate
66+
67+
// create the model data that will be represented by Nodes and Links
68+
myDiagram.model = new go.GraphLinksModel(
69+
[
70+
{ key: &quot;Alpha&quot;, color: &quot;lightblue&quot; },
71+
{ key: &quot;Beta&quot;, color: &quot;orange&quot; },
72+
{ key: &quot;Gamma&quot;, color: &quot;lightgreen&quot; },
73+
{ key: &quot;Delta&quot;, color: &quot;pink&quot; }
74+
],
75+
[
76+
{ from: &quot;Alpha&quot;, to: &quot;Beta&quot; },
77+
{ from: &quot;Alpha&quot;, to: &quot;Gamma&quot; },
78+
{ from: &quot;Beta&quot;, to: &quot;Beta&quot; },
79+
{ from: &quot;Gamma&quot;, to: &quot;Delta&quot; },
80+
{ from: &quot;Delta&quot;, to: &quot;Alpha&quot; }
81+
]);
82+
&lt;/script&gt;
83+
</code></pre>
84+
<p>The above diagram and model code creates the following graph.
85+
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.</p>
86+
<p><a href="https://gojs.net/latest/samples/minimal.html"><img width="200" height="200" src="https://gojs.net/latest/assets/images/screenshots/minimal.png"></a></p>
87+
<p><em>Click the image to see the interactive GoJS Diagram</em></p>
88+
<h2>Support</h2>
89+
<p>Northwoods Software offers a month of free developer-to-developer support for GoJS to prospective customers so you can finish your project faster.</p>
90+
<p>Read and search the official <a href="https://forum.nwoods.com/c/gojs">GoJS forum</a> for any topics related to your questions.</p>
91+
<p>Posting in the forum is the fastest and most effective way of obtaining support for any GoJS related inquiries.
92+
Please register for support at Northwoods Software's <a href="https://www.nwoods.com/register.html">registration form</a> before posting in the forum.</p>
93+
<p>For any nontechnical questions about GoJS, such as about sales or licensing,
94+
please visit Northwoods Software's <a href="https://www.nwoods.com/contact.html">contact form</a>.</p>
95+
<h2>License</h2>
96+
<p>The GoJS <a href="https://gojs.net/latest/license.html">software license</a>.</p>
97+
<p>Copyright (c) Northwoods Software Corporation</p>

README.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,43 @@ GoJS, a JavaScript Library for HTML Diagrams
1616
[Get Started with GoJS](https://gojs.net/latest/learn)
1717

1818

19-
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 for [flowchart](https://gojs.net/latest/samples/flowchart.html), [org chart](https://gojs.net/latest/samples/orgChartEditor.html), [business process BPMN](https://gojs.net/latest/projects/bpmn/BPMN.html), [swimlanes](https://gojs.net/latest/samples/swimlanes.html), [timelines](https://gojs.net/latest/samples/timeline.html), [state charts](https://gojs.net/latest/samples/statechart.html), [kanban](https://gojs.net/latest/samples/kanban.html), [network](https://gojs.net/latest/samples/network.html), [mindmap](https://gojs.net/latest/samples/mindMap.html), [sankey](https://gojs.net/latest/samples/sankey.html), [family trees](https://gojs.net/latest/samples/familyTree.html) and [genogram charts](https://gojs.net/latest/samples/genogram.html), [fishbone diagrams](https://gojs.net/latest/extensions/Fishbone.html), [floor plans](https://gojs.net/latest/projects/floorplanner/FloorPlanner.html), [UML](https://gojs.net/latest/samples/umlClass.html), [decision trees](https://gojs.net/latest/samples/decisionTree.html), [pert charts](https://gojs.net/latest/samples/PERT.html), [Gantt](https://gojs.net/latest/samples/gantt.html), and [hundreds more](https://gojs.net/latest/samples/index.html). GoJS includes a number of built in layouts including tree layout, force directed, radial, and layered digraph layout, and a number of custom layout examples.
20-
21-
GoJS is rendered with an HTML Canvas element (with export to SVG or image formats). GoJS can run in a web browser, or server side in [Node](https://nodejs.org/en/) or [Puppeteer](https://github.com/GoogleChrome/puppeteer). GoJS Diagrams are backed by Models, with saving and loading typically via JSON.
19+
GoJS is a flexible library that can be used to create a number of different kinds of interactive diagrams,
20+
including data visualizations, drawing tools, and graph editors.
21+
There are samples for
22+
[flowchart](https://gojs.net/latest/samples/flowchart.html),
23+
[org chart](https://gojs.net/latest/samples/orgChartEditor.html),
24+
[business process BPMN](https://gojs.net/latest/samples/bpmn/BPMN.html),
25+
[swimlanes](https://gojs.net/latest/samples/swimlanes.html),
26+
[timelines](https://gojs.net/latest/samples/timeline.html),
27+
[state charts](https://gojs.net/latest/samples/statechart.html),
28+
[kanban](https://gojs.net/latest/samples/kanban.html),
29+
[network](https://gojs.net/latest/samples/network.html),
30+
[mindmap](https://gojs.net/latest/samples/mindMap.html),
31+
[sankey](https://gojs.net/latest/samples/sankey.html),
32+
[family trees](https://gojs.net/latest/samples/familyTree.html) and [genogram charts](https://gojs.net/latest/samples/genogram.html),
33+
[fishbone diagrams](https://gojs.net/latest/samples/Fishbone.html),
34+
[floor plans](https://gojs.net/latest/samples/floorplannerTS/index.html),
35+
[UML](https://gojs.net/latest/samples/umlClass.html),
36+
[decision trees](https://gojs.net/latest/samples/decisionTree.html),
37+
[PERT charts](https://gojs.net/latest/samples/PERT.html),
38+
[Gantt](https://gojs.net/latest/samples/gantt.html), and
39+
[hundreds more](https://gojs.net/latest/samples/index.html).
40+
GoJS includes a number of built in layouts including tree layout, force directed, circular, and layered digraph layout,
41+
and many custom layout extensions and examples.
42+
43+
GoJS is renders either to an HTML Canvas element (with export to SVG or image formats) or directly as SVG DOM.
44+
GoJS can run in a web browser, or server side in [Node](https://nodejs.org/en/) or [Puppeteer](https://github.com/GoogleChrome/puppeteer).
45+
GoJS Diagrams are backed by Models, with saving and loading typically via JSON-formatted text.
2246

2347
[<img src="https://raw.githubusercontent.com/NorthwoodsSoftware/GoJS/master/.github/github-970x354.png">](https://gojs.net/latest/samples/index.html)
2448

2549
Read more about GoJS at [gojs.net](https://gojs.net)
2650

27-
This repository contains both the library and the sources for all samples, extensions, and documentation.
51+
This repository contains only the library.
52+
The sources for all samples, extensions, and documentation can be installed by running:
53+
```html
54+
$ npm create gojs-kit
55+
```
2856
You can use the GitHub repository to quickly [search through all of the sources](https://github.com/NorthwoodsSoftware/GoJS-Samples/search?q=setDataProperty&type=Code).
2957

3058
<h2>Minimal Sample</h2>
@@ -81,7 +109,7 @@ The user can now click on nodes or links to select them, copy-and-paste them, dr
81109

82110
<h2>Support</h2>
83111

84-
Northwoods Software offers a month of free developer-to-developer support for GoJS to help you get started on your project.
112+
Northwoods Software offers a month of free developer-to-developer support for GoJS to prospective customers so you can finish your project faster.
85113

86114
Read and search the official <a href="https://forum.nwoods.com/c/gojs">GoJS forum</a> for any topics related to your questions.
87115

api/assets/highlight.css

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
:root {
2-
--light-hl-0: #6A9955;
2+
--light-hl-0: #008000;
33
--dark-hl-0: #6A9955;
4-
--light-hl-1: #569CD6;
4+
--light-hl-1: #0000FF;
55
--dark-hl-1: #569CD6;
6-
--light-hl-2: #D4D4D4;
6+
--light-hl-2: #000000;
77
--dark-hl-2: #D4D4D4;
8-
--light-hl-3: #4FC1FF;
8+
--light-hl-3: #0070C1;
99
--dark-hl-3: #4FC1FF;
10-
--light-hl-4: #9CDCFE;
10+
--light-hl-4: #001080;
1111
--dark-hl-4: #9CDCFE;
12-
--light-hl-5: #DCDCAA;
12+
--light-hl-5: #795E26;
1313
--dark-hl-5: #DCDCAA;
14-
--light-hl-6: #CE9178;
14+
--light-hl-6: #A31515;
1515
--dark-hl-6: #CE9178;
16-
--light-hl-7: #B5CEA8;
16+
--light-hl-7: #098658;
1717
--dark-hl-7: #B5CEA8;
18-
--light-hl-8: #C586C0;
18+
--light-hl-8: #AF00DB;
1919
--dark-hl-8: #C586C0;
20-
--light-hl-9: #C8C8C8;
20+
--light-hl-9: #000000;
2121
--dark-hl-9: #C8C8C8;
22-
--light-hl-10: #808080;
22+
--light-hl-10: #800000;
2323
--dark-hl-10: #808080;
24-
--light-hl-11: #4EC9B0;
25-
--dark-hl-11: #4EC9B0;
26-
--light-hl-12: #F44747;
27-
--dark-hl-12: #F44747;
28-
--light-code-background: #1E1E1E;
24+
--light-hl-11: #800000;
25+
--dark-hl-11: #569CD6;
26+
--light-hl-12: #E50000;
27+
--dark-hl-12: #9CDCFE;
28+
--light-hl-13: #0000FF;
29+
--dark-hl-13: #CE9178;
30+
--light-hl-14: #267F99;
31+
--dark-hl-14: #4EC9B0;
32+
--light-hl-15: #CD3131;
33+
--dark-hl-15: #F44747;
34+
--light-code-background: #FFFFFF;
2935
--dark-code-background: #1E1E1E;
3036
}
3137

@@ -43,6 +49,9 @@
4349
--hl-10: var(--light-hl-10);
4450
--hl-11: var(--light-hl-11);
4551
--hl-12: var(--light-hl-12);
52+
--hl-13: var(--light-hl-13);
53+
--hl-14: var(--light-hl-14);
54+
--hl-15: var(--light-hl-15);
4655
--code-background: var(--light-code-background);
4756
} }
4857

@@ -60,10 +69,13 @@
6069
--hl-10: var(--dark-hl-10);
6170
--hl-11: var(--dark-hl-11);
6271
--hl-12: var(--dark-hl-12);
72+
--hl-13: var(--dark-hl-13);
73+
--hl-14: var(--dark-hl-14);
74+
--hl-15: var(--dark-hl-15);
6375
--code-background: var(--dark-code-background);
6476
} }
6577

66-
body.light {
78+
:root[data-theme='light'] {
6779
--hl-0: var(--light-hl-0);
6880
--hl-1: var(--light-hl-1);
6981
--hl-2: var(--light-hl-2);
@@ -77,10 +89,13 @@ body.light {
7789
--hl-10: var(--light-hl-10);
7890
--hl-11: var(--light-hl-11);
7991
--hl-12: var(--light-hl-12);
92+
--hl-13: var(--light-hl-13);
93+
--hl-14: var(--light-hl-14);
94+
--hl-15: var(--light-hl-15);
8095
--code-background: var(--light-code-background);
8196
}
8297

83-
body.dark {
98+
:root[data-theme='dark'] {
8499
--hl-0: var(--dark-hl-0);
85100
--hl-1: var(--dark-hl-1);
86101
--hl-2: var(--dark-hl-2);
@@ -94,6 +109,9 @@ body.dark {
94109
--hl-10: var(--dark-hl-10);
95110
--hl-11: var(--dark-hl-11);
96111
--hl-12: var(--dark-hl-12);
112+
--hl-13: var(--dark-hl-13);
113+
--hl-14: var(--dark-hl-14);
114+
--hl-15: var(--dark-hl-15);
97115
--code-background: var(--dark-code-background);
98116
}
99117

@@ -110,4 +128,7 @@ body.dark {
110128
.hl-10 { color: var(--hl-10); }
111129
.hl-11 { color: var(--hl-11); }
112130
.hl-12 { color: var(--hl-12); }
113-
pre { background: var(--code-background);
131+
.hl-13 { color: var(--hl-13); }
132+
.hl-14 { color: var(--hl-14); }
133+
.hl-15 { color: var(--hl-15); }
134+
pre, code { background: var(--code-background); }

0 commit comments

Comments
 (0)