apexsankey 1.2.1 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ const Configuration = {
2
+ extends: ["@commitlint/config-conventional"],
3
+ };
4
+
5
+ export default Configuration;
@@ -1,84 +1,93 @@
1
- <!doctype html>
1
+ <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Document</title>
7
- <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap" rel="stylesheet" />
7
+ <link
8
+ href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap"
9
+ rel="stylesheet"
10
+ />
8
11
  <script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js"></script>
9
12
  <script src="../apexsankey.min.js"></script>
10
13
  </head>
11
14
  <body>
12
- <div id="svg-sankey" style="margin: 0 auto; width: 800px; height: 600px"></div>
15
+ <div
16
+ id="svg-sankey"
17
+ style="margin: 0 auto; width: 800px; height: 600px"
18
+ ></div>
13
19
  <script>
14
20
  const data = {
15
21
  nodes: [
16
22
  {
17
- id: 'Oil',
18
- title: 'Oil',
23
+ id: "Oil",
24
+ title: "Oil",
19
25
  },
20
26
  {
21
- id: 'Natural Gas',
22
- title: 'Natural Gas',
27
+ id: "Natural Gas",
28
+ title: "Natural Gas",
23
29
  },
24
30
  {
25
- id: 'Coal',
26
- title: 'Coal',
31
+ id: "Coal",
32
+ title: "Coal",
27
33
  },
28
34
  {
29
- id: 'Fossil Fuels',
30
- title: 'Fossil Fuels',
35
+ id: "Fossil Fuels",
36
+ title: "Fossil Fuels",
31
37
  },
32
38
  {
33
- id: 'Electricity',
34
- title: 'Electricity',
39
+ id: "Electricity",
40
+ title: "Electricity",
35
41
  },
36
42
  {
37
- id: 'Energy',
38
- title: 'Energy',
43
+ id: "Energy",
44
+ title: "Energy",
39
45
  },
40
46
  ],
41
47
  edges: [
42
48
  {
43
- source: 'Oil',
44
- target: 'Fossil Fuels',
49
+ source: "Oil",
50
+ target: "Fossil Fuels",
45
51
  value: 15,
46
52
  },
47
53
  {
48
- source: 'Natural Gas',
49
- target: 'Fossil Fuels',
54
+ source: "Natural Gas",
55
+ target: "Fossil Fuels",
50
56
  value: 20,
51
57
  },
52
58
  {
53
- source: 'Coal',
54
- target: 'Fossil Fuels',
59
+ source: "Coal",
60
+ target: "Fossil Fuels",
55
61
  value: 25,
56
62
  },
57
63
  {
58
- source: 'Coal',
59
- target: 'Electricity',
64
+ source: "Coal",
65
+ target: "Electricity",
60
66
  value: 25,
61
67
  },
62
68
  {
63
- source: 'Fossil Fuels',
64
- target: 'Energy',
69
+ source: "Fossil Fuels",
70
+ target: "Energy",
65
71
  value: 60,
66
72
  },
67
73
  {
68
- source: 'Electricity',
69
- target: 'Energy',
74
+ source: "Electricity",
75
+ target: "Energy",
70
76
  value: 25,
71
77
  },
72
78
  ],
73
79
  };
74
80
  const graphOptions = {
75
81
  nodeWidth: 20,
76
- fontFamily: 'Quicksand, sans-serif',
77
- fontWeight: '600',
82
+ fontFamily: "Quicksand, sans-serif",
83
+ fontWeight: "600",
78
84
  height: 600,
79
85
  enableToolbar: true,
80
86
  };
81
- const s = new ApexSankey(document.getElementById('svg-sankey'), graphOptions);
87
+ const s = new ApexSankey(
88
+ document.getElementById("svg-sankey"),
89
+ graphOptions
90
+ );
82
91
  s.render(data);
83
92
  </script>
84
93
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apexsankey",
3
- "version": "1.2.1",
3
+ "version": "1.2.4",
4
4
  "dependencies": {
5
5
  "defined": "^1.0.1",
6
6
  "graphlib": "~2.1.0",
@@ -10,6 +10,7 @@
10
10
  "main": "./apexsankey.min.js",
11
11
  "module": "./apexsankey.es.min.js",
12
12
  "types": "./index.d.ts",
13
+ "license": "See License in LICENSE",
13
14
  "exports": {
14
15
  ".": {
15
16
  "import": {
@@ -21,5 +22,21 @@
21
22
  "default": "./apexsankey.min.js"
22
23
  }
23
24
  }
25
+ },
26
+ "devDependencies": {
27
+ "@commitlint/cli": "^19.8.1",
28
+ "@commitlint/config-conventional": "^19.8.1",
29
+ "commitlint": "^19.8.1",
30
+ "husky": "^9.1.7",
31
+ "standard-version": "^9.5.0"
32
+ },
33
+ "scripts": {
34
+ "prepare": "husky",
35
+ "release": "standard-version --no-tag"
36
+ },
37
+ "standard-version": {
38
+ "skip": {
39
+ "tag": true
40
+ }
24
41
  }
25
- }
42
+ }