You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, you can get cedar from the [unpkg.com](https://unpkg.com/) CDN as shown below.
35
+
Alternatively, you can get cedar from the [unpkg.com](https://unpkg.com/) CDN as [shown below](#from-a-cdn).
36
+
37
+
### Importing Cedar
38
+
39
+
If you're using Cedar in a modern web application built with a bundler like [webpack](https://webpack.js.org/), you can load Cedar and its [dependencies](#dependencies) using `import` statements.
40
+
41
+
```js
42
+
// import the amCharts base library
43
+
import"amcharts3/amcharts/amcharts";
44
+
// in this case, we only need bar charts, so we'll import the appropriate amCharts module
45
+
import"amcharts3/amcharts/serial";
46
+
// optionally import an amcharts theme; cedar provides a calcite theme
If you need to use other chart types, or want to use amCharts plugins, import the appropriate amCharts modules _before importing cedar_:
53
+
54
+
```js
55
+
// for pie charts
56
+
import"amcharts3/amcharts/pie";
57
+
// for scatter and bubble charts
58
+
import"amcharts3/amcharts/xy";
59
+
// for radar charts
60
+
import"amcharts3/amcharts/radar";
61
+
```
62
+
63
+
See the [amCharts documentation](https://github.com/amcharts/amcharts3) for more information on the available amCharts modules.
40
64
41
65
### Loading Cedar
42
66
43
-
You can load Cedar and its [dependencies](#dependencies) by including script tags that point to the CDN or your locally installed versions of these libraries. This will make the `cedar` global available to your application.
67
+
Instead of [installing](installing-cedar) and [importing](importing-cedar) Cedar, you can load Cedar and its [dependencies](#dependencies) by including script tags that point to the CDN (or your locally installed versions of these libraries). This will make the `cedar` global available to your application.
68
+
69
+
#### From a CDN
44
70
45
71
```html
46
72
<!-- load the amCharts base library -->
@@ -80,47 +106,51 @@ Once cedar is loaded you can create and show the chart at a designated element.
80
106
81
107
Then add a script that will configure cedar and render the chart:
0 commit comments