chartjs-chart-sankey 0.14.1 → 0.14.2

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.
Files changed (2) hide show
  1. package/README.md +21 -0
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -36,6 +36,27 @@ import {SankeyController, Flow} from 'chartjs-chart-sankey';
36
36
  Chart.register(SankeyController, Flow);
37
37
  ```
38
38
 
39
+ For script tag usage, load the browser bundle after Chart.js. The browser bundle registers the sankey controller
40
+ and flow element automatically.
41
+
42
+ ```html
43
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
44
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-chart-sankey"></script>
45
+ ```
46
+
47
+ The same bundle can be loaded from UNPKG:
48
+
49
+ ```html
50
+ <script src="https://unpkg.com/chart.js"></script>
51
+ <script src="https://unpkg.com/chartjs-chart-sankey"></script>
52
+ ```
53
+
54
+ If a CDN does not use the package metadata for its default file, reference the browser bundle directly:
55
+
56
+ ```html
57
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-chart-sankey/dist/chartjs-chart-sankey.min.js"></script>
58
+ ```
59
+
39
60
  To create a sankey chart, include chartjs-chart-sankey.js after chart.js and then create the chart by setting the `type`
40
61
  attribute to `'sankey'`
41
62
 
package/package.json CHANGED
@@ -53,6 +53,7 @@
53
53
  "!dist/docs/**"
54
54
  ],
55
55
  "homepage": "https://chartjs-chart-sankey.pages.dev/",
56
+ "jsdelivr": "dist/chartjs-chart-sankey.min.js",
56
57
  "keywords": [
57
58
  "chart.js",
58
59
  "chart",
@@ -92,5 +93,6 @@
92
93
  },
93
94
  "type": "module",
94
95
  "types": "dist/index.esm.d.ts",
95
- "version": "0.14.1"
96
+ "unpkg": "dist/chartjs-chart-sankey.min.js",
97
+ "version": "0.14.2"
96
98
  }