@hpcc-js/chart 2.74.0 → 2.77.0

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.
package/README.md CHANGED
@@ -18,16 +18,17 @@ This package is part of the mono repository "@hpcc-js" (aka Visualization Framew
18
18
  * [WordCloud](https://raw.githack.com/hpcc-systems/Visualization/trunk/demos/gallery/playground.html?./samples/misc/Word%20Cloud.js)
19
19
 
20
20
  ## Stand-alone HTML Example
21
- ```html
22
- <html>
21
+
22
+ <ClientOnly>
23
+ <hpcc-preview content_selector="pre > code" style="width:100%;height:600px">
23
24
  <head>
24
25
  <title>Simple Bar Chart</title>
25
- <script src="https://unpkg.com/@hpcc-js/common"></script>
26
- <script src="https://unpkg.com/@hpcc-js/api"></script>
27
- <script src="https://unpkg.com/@hpcc-js/chart"></script>
26
+ <script src="https://cdn.jsdelivr.net/npm/@hpcc-js/common"></script>
27
+ <script src="https://cdn.jsdelivr.net/npm/@hpcc-js/api"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@hpcc-js/chart"></script>
28
29
  </head>
29
30
  <body>
30
- <div id="placeholder" style="width:800px;height:600px;"></div>
31
+ <div id="placeholder" style="height:300px;"></div>
31
32
  <script>
32
33
  var chart = new window["@hpcc-js/chart"].Bar()
33
34
  .target("placeholder")
@@ -41,7 +42,8 @@ This package is part of the mono repository "@hpcc-js" (aka Visualization Framew
41
42
  .render();
42
43
  </script>
43
44
  </body>
44
- </html>
45
+ </hpcc-preview>
46
+ </ClientOnly>
45
47
  ```
46
48
 
47
49
  ## Getting Started with @hpccjs
@@ -49,3 +51,34 @@ This package is part of the mono repository "@hpcc-js" (aka Visualization Framew
49
51
  * _[Tutorials](https://github.com/hpcc-systems/Visualization/wiki/Tutorials)_
50
52
  * _[Gallery](https://raw.githack.com/hpcc-systems/Visualization/trunk/demos/gallery/gallery.html)_ ([alt](https://rawgit.com/hpcc-systems/Visualization/trunk/demos/gallery/gallery.html))
51
53
  * _[Wiki](https://github.com/hpcc-systems/Visualization/wiki)_
54
+
55
+ <ClientOnly>
56
+ <hpcc-vitepress style="width:100%;height:600px">
57
+ <div id="target" style="width:100%;height:400px">
58
+ </div>
59
+ <script type="module">
60
+ import { Contour } from "@hpcc-js/chart";
61
+
62
+ new Contour()
63
+ .target("target")
64
+ .columns(["A", "B"])
65
+ .data([
66
+ [10, 10],
67
+ [20, 20],
68
+ [20, 30],
69
+ [30, 20],
70
+ [40, 30],
71
+ [30, 40],
72
+ [10, 20],
73
+ [20, 10]
74
+ ])
75
+ .contourBandwidth(80)
76
+ .contourStrokeWidth(0)
77
+ .yAxisType("linear")
78
+ .xAxisType("ordinal")
79
+ .xAxisTitle("A")
80
+ .render()
81
+ ;
82
+ </script>
83
+ </hpcc-vitepress>
84
+ </ClientOnly>