@carbon/charts-angular 0.59.0-beta.0 → 1.0.3
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/CHANGELOG.md +51 -0
- package/LICENSE.md +201 -0
- package/README.md +23 -8
- package/{dist/alluvial-chart.component.d.ts → alluvial-chart.component.d.ts} +0 -0
- package/{dist/area-chart-stacked.component.d.ts → area-chart-stacked.component.d.ts} +0 -0
- package/{dist/area-chart.component.d.ts → area-chart.component.d.ts} +0 -0
- package/{dist/bar-chart-grouped.component.d.ts → bar-chart-grouped.component.d.ts} +0 -0
- package/{dist/bar-chart-simple.component.d.ts → bar-chart-simple.component.d.ts} +0 -0
- package/{dist/bar-chart-stacked.component.d.ts → bar-chart-stacked.component.d.ts} +0 -0
- package/{dist/base-chart.component.d.ts → base-chart.component.d.ts} +0 -0
- package/{dist/boxplot-chart.component.d.ts → boxplot-chart.component.d.ts} +0 -0
- package/{dist/bubble-chart.component.d.ts → bubble-chart.component.d.ts} +0 -0
- package/{dist/bullet-chart.component.d.ts → bullet-chart.component.d.ts} +0 -0
- package/{dist/bundles → bundles}/carbon-charts-angular.umd.js +0 -0
- package/{dist/bundles → bundles}/carbon-charts-angular.umd.js.map +0 -0
- package/{dist/bundles → bundles}/carbon-charts-angular.umd.min.js +0 -0
- package/{dist/bundles → bundles}/carbon-charts-angular.umd.min.js.map +0 -0
- package/{dist/carbon-charts-angular.d.ts → carbon-charts-angular.d.ts} +0 -0
- package/{dist/carbon-charts-angular.metadata.json → carbon-charts-angular.metadata.json} +0 -0
- package/{dist/charts.module.d.ts → charts.module.d.ts} +0 -0
- package/{dist/circle-pack-chart.component.d.ts → circle-pack-chart.component.d.ts} +0 -0
- package/{dist/combo-chart.component.d.ts → combo-chart.component.d.ts} +0 -0
- package/{dist/diagrams → diagrams}/card-node/card-node-column.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/card-node/card-node-label.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/card-node/card-node-subtitle.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/card-node/card-node-title.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/card-node/card-node.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/card-node/card-node.module.d.ts +0 -0
- package/{dist/diagrams → diagrams}/configs.d.ts +0 -0
- package/{dist/diagrams → diagrams}/edge/edge.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/edge/edge.module.d.ts +0 -0
- package/{dist/diagrams → diagrams}/marker/marker.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/marker/marker.module.d.ts +0 -0
- package/{dist/diagrams → diagrams}/shape-node/shape-node.component.d.ts +0 -0
- package/{dist/diagrams → diagrams}/shape-node/shape-node.module.d.ts +0 -0
- package/{dist/donut-chart.component.d.ts → donut-chart.component.d.ts} +0 -0
- package/{dist/esm2015 → esm2015}/alluvial-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/area-chart-stacked.component.js +0 -0
- package/{dist/esm2015 → esm2015}/area-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/bar-chart-grouped.component.js +0 -0
- package/{dist/esm2015 → esm2015}/bar-chart-simple.component.js +0 -0
- package/{dist/esm2015 → esm2015}/bar-chart-stacked.component.js +0 -0
- package/{dist/esm2015 → esm2015}/base-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/boxplot-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/bubble-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/bullet-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/carbon-charts-angular.js +0 -0
- package/{dist/esm2015 → esm2015}/charts.module.js +0 -0
- package/{dist/esm2015 → esm2015}/circle-pack-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/combo-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/card-node/card-node-column.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/card-node/card-node-label.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/card-node/card-node-subtitle.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/card-node/card-node-title.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/card-node/card-node.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/card-node/card-node.module.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/configs.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/edge/edge.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/edge/edge.module.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/marker/marker.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/marker/marker.module.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/shape-node/shape-node.component.js +0 -0
- package/{dist/esm2015 → esm2015}/diagrams/shape-node/shape-node.module.js +0 -0
- package/{dist/esm2015 → esm2015}/donut-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/gauge-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/heatmap-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/histogram-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/index.js +0 -0
- package/{dist/esm2015 → esm2015}/line-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/lollipop-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/meter-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/pie-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/radar-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/scatter-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/tree-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/treemap-chart.component.js +0 -0
- package/{dist/esm2015 → esm2015}/wordcloud-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/alluvial-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/area-chart-stacked.component.js +0 -0
- package/{dist/esm5 → esm5}/area-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/bar-chart-grouped.component.js +0 -0
- package/{dist/esm5 → esm5}/bar-chart-simple.component.js +0 -0
- package/{dist/esm5 → esm5}/bar-chart-stacked.component.js +0 -0
- package/{dist/esm5 → esm5}/base-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/boxplot-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/bubble-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/bullet-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/carbon-charts-angular.js +0 -0
- package/{dist/esm5 → esm5}/charts.module.js +0 -0
- package/{dist/esm5 → esm5}/circle-pack-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/combo-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/card-node/card-node-column.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/card-node/card-node-label.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/card-node/card-node-subtitle.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/card-node/card-node-title.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/card-node/card-node.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/card-node/card-node.module.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/configs.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/edge/edge.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/edge/edge.module.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/marker/marker.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/marker/marker.module.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/shape-node/shape-node.component.js +0 -0
- package/{dist/esm5 → esm5}/diagrams/shape-node/shape-node.module.js +0 -0
- package/{dist/esm5 → esm5}/donut-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/gauge-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/heatmap-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/histogram-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/index.js +0 -0
- package/{dist/esm5 → esm5}/line-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/lollipop-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/meter-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/pie-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/radar-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/scatter-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/tree-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/treemap-chart.component.js +0 -0
- package/{dist/esm5 → esm5}/wordcloud-chart.component.js +0 -0
- package/{dist/fesm2015 → fesm2015}/carbon-charts-angular.js +0 -0
- package/{dist/fesm2015 → fesm2015}/carbon-charts-angular.js.map +0 -0
- package/{dist/fesm5 → fesm5}/carbon-charts-angular.js +0 -0
- package/{dist/fesm5 → fesm5}/carbon-charts-angular.js.map +0 -0
- package/{dist/gauge-chart.component.d.ts → gauge-chart.component.d.ts} +0 -0
- package/{dist/heatmap-chart.component.d.ts → heatmap-chart.component.d.ts} +0 -0
- package/{dist/histogram-chart.component.d.ts → histogram-chart.component.d.ts} +0 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/line-chart.component.d.ts → line-chart.component.d.ts} +0 -0
- package/{dist/lollipop-chart.component.d.ts → lollipop-chart.component.d.ts} +0 -0
- package/{dist/meter-chart.component.d.ts → meter-chart.component.d.ts} +0 -0
- package/package.json +108 -103
- package/{dist/pie-chart.component.d.ts → pie-chart.component.d.ts} +0 -0
- package/{dist/radar-chart.component.d.ts → radar-chart.component.d.ts} +0 -0
- package/{dist/scatter-chart.component.d.ts → scatter-chart.component.d.ts} +0 -0
- package/{dist/tree-chart.component.d.ts → tree-chart.component.d.ts} +0 -0
- package/{dist/treemap-chart.component.d.ts → treemap-chart.component.d.ts} +0 -0
- package/{dist/wordcloud-chart.component.d.ts → wordcloud-chart.component.d.ts} +0 -0
- package/.storybook/addons.js +0 -2
- package/.storybook/assets/logo.svg +0 -1
- package/.storybook/assets/share.png +0 -0
- package/.storybook/assets/welcome.png +0 -0
- package/.storybook/config.js +0 -22
- package/.storybook/manager-head.html +0 -45
- package/.storybook/preview-head.html +0 -10
- package/.storybook/tsconfig.json +0 -10
- package/angular.json +0 -68
- package/build.sh +0 -13
- package/carbon.yml +0 -275
- package/dist/CHANGELOG.md +0 -3168
- package/dist/README.md +0 -40
- package/dist/package.json +0 -109
- package/ng-package.json +0 -8
- package/src/alluvial-chart.component.ts +0 -34
- package/src/area-chart-stacked.component.ts +0 -34
- package/src/area-chart.component.ts +0 -37
- package/src/bar-chart-grouped.component.ts +0 -34
- package/src/bar-chart-simple.component.ts +0 -34
- package/src/bar-chart-stacked.component.ts +0 -34
- package/src/base-chart.component.ts +0 -102
- package/src/boxplot-chart.component.ts +0 -34
- package/src/bubble-chart.component.ts +0 -34
- package/src/bullet-chart.component.ts +0 -34
- package/src/charts.module.ts +0 -87
- package/src/circle-pack-chart.component.ts +0 -34
- package/src/combo-chart.component.ts +0 -33
- package/src/diagrams/card-node/card-node-column.component.ts +0 -22
- package/src/diagrams/card-node/card-node-label.component.ts +0 -15
- package/src/diagrams/card-node/card-node-subtitle.component.ts +0 -15
- package/src/diagrams/card-node/card-node-title.component.ts +0 -15
- package/src/diagrams/card-node/card-node.component.ts +0 -100
- package/src/diagrams/card-node/card-node.module.ts +0 -18
- package/src/diagrams/configs.ts +0 -1
- package/src/diagrams/edge/edge.component.ts +0 -45
- package/src/diagrams/edge/edge.module.ts +0 -11
- package/src/diagrams/marker/marker.component.ts +0 -68
- package/src/diagrams/marker/marker.module.ts +0 -43
- package/src/diagrams/shape-node/shape-node.component.ts +0 -133
- package/src/diagrams/shape-node/shape-node.module.ts +0 -11
- package/src/donut-chart.component.ts +0 -34
- package/src/gauge-chart.component.ts +0 -34
- package/src/heatmap-chart.component.ts +0 -34
- package/src/histogram-chart.component.ts +0 -34
- package/src/index.ts +0 -44
- package/src/line-chart.component.ts +0 -34
- package/src/lollipop-chart.component.ts +0 -34
- package/src/meter-chart.component.ts +0 -33
- package/src/pie-chart.component.ts +0 -34
- package/src/radar-chart.component.ts +0 -34
- package/src/scatter-chart.component.ts +0 -34
- package/src/tree-chart.component.ts +0 -34
- package/src/treemap-chart.component.ts +0 -34
- package/src/wordcloud-chart.component.ts +0 -34
- package/stories/all.stories.ts +0 -99
- package/stories/diagrams/0_diagram.stories.ts +0 -224
- package/stories/diagrams/card-node.stories.ts +0 -181
- package/stories/diagrams/edge.stories.ts +0 -127
- package/stories/diagrams/marker.stories.ts +0 -140
- package/stories/diagrams/shape-node.stories.ts +0 -98
- package/tsconfig.json +0 -30
- package/tslint.json +0 -95
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { HistogramChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `HistogramChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-histogram-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class HistogramChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new HistogramChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export * from './charts.module';
|
|
2
|
-
|
|
3
|
-
export * from './base-chart.component';
|
|
4
|
-
export * from './area-chart.component';
|
|
5
|
-
export * from './area-chart-stacked.component';
|
|
6
|
-
export * from './bar-chart-simple.component';
|
|
7
|
-
export * from './bar-chart-grouped.component';
|
|
8
|
-
export * from './bar-chart-stacked.component';
|
|
9
|
-
export * from './boxplot-chart.component';
|
|
10
|
-
export * from './bubble-chart.component';
|
|
11
|
-
export * from './bullet-chart.component';
|
|
12
|
-
export * from './donut-chart.component';
|
|
13
|
-
export * from './gauge-chart.component';
|
|
14
|
-
export * from './histogram-chart.component';
|
|
15
|
-
export * from './line-chart.component';
|
|
16
|
-
export * from './lollipop-chart.component';
|
|
17
|
-
export * from './pie-chart.component';
|
|
18
|
-
export * from './scatter-chart.component';
|
|
19
|
-
export * from './meter-chart.component';
|
|
20
|
-
export * from './radar-chart.component';
|
|
21
|
-
export * from './combo-chart.component';
|
|
22
|
-
export * from './tree-chart.component';
|
|
23
|
-
export * from './treemap-chart.component';
|
|
24
|
-
export * from './circle-pack-chart.component';
|
|
25
|
-
export * from './wordcloud-chart.component';
|
|
26
|
-
export * from './alluvial-chart.component';
|
|
27
|
-
export * from './heatmap-chart.component';
|
|
28
|
-
|
|
29
|
-
// Diagrams
|
|
30
|
-
export * from './diagrams/card-node/card-node.module';
|
|
31
|
-
export * from './diagrams/card-node/card-node-column.component';
|
|
32
|
-
export * from './diagrams/card-node/card-node-label.component';
|
|
33
|
-
export * from './diagrams/card-node/card-node-subtitle.component';
|
|
34
|
-
export * from './diagrams/card-node/card-node-title.component';
|
|
35
|
-
export * from './diagrams/card-node/card-node.component';
|
|
36
|
-
|
|
37
|
-
export * from './diagrams/edge/edge.module';
|
|
38
|
-
export * from './diagrams/edge/edge.component';
|
|
39
|
-
|
|
40
|
-
export * from './diagrams/marker/marker.module';
|
|
41
|
-
export * from './diagrams/marker/marker.component';
|
|
42
|
-
|
|
43
|
-
export * from './diagrams/shape-node/shape-node.module';
|
|
44
|
-
export * from './diagrams/shape-node/shape-node.component';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { LineChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `LineChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-line-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class LineChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new LineChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { LollipopChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `LollipopChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-lollipop-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class LollipopChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new LollipopChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
import { MeterChart } from "@carbon/charts";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Wrapper around `MeterChart` in carbon charts library
|
|
11
|
-
*
|
|
12
|
-
* Most functions just call their equivalent from the chart library.
|
|
13
|
-
*/
|
|
14
|
-
@Component({
|
|
15
|
-
selector: "ibm-meter-chart",
|
|
16
|
-
template: ``
|
|
17
|
-
})
|
|
18
|
-
export class MeterChartComponent extends BaseChart implements AfterViewInit {
|
|
19
|
-
/**
|
|
20
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
21
|
-
*/
|
|
22
|
-
ngAfterViewInit() {
|
|
23
|
-
this.chart = new MeterChart(
|
|
24
|
-
this.elementRef.nativeElement,
|
|
25
|
-
{
|
|
26
|
-
data: this.data,
|
|
27
|
-
options: this.options
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
Object.assign(this, this.chart);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { PieChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `PieChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-pie-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class PieChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new PieChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { RadarChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `RadarChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-radar-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class RadarChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new RadarChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { ScatterChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `ScatterChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-scatter-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class ScatterChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new ScatterChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { TreeChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `TreeChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-tree-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class TreeChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new TreeChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { TreemapChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `TreemapChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-treemap-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class TreemapChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new TreemapChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
AfterViewInit
|
|
4
|
-
} from "@angular/core";
|
|
5
|
-
|
|
6
|
-
import { BaseChart } from "./base-chart.component";
|
|
7
|
-
|
|
8
|
-
import { WordCloudChart } from "@carbon/charts";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Wrapper around `WordCloudChart` in carbon charts library
|
|
12
|
-
*
|
|
13
|
-
* Most functions just call their equivalent from the chart library.
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
selector: "ibm-wordcloud-chart",
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class WordCloudChartComponent extends BaseChart implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
|
|
22
|
-
*/
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
this.chart = new WordCloudChart(
|
|
25
|
-
this.elementRef.nativeElement,
|
|
26
|
-
{
|
|
27
|
-
data: this.data,
|
|
28
|
-
options: this.options
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
Object.assign(this, this.chart);
|
|
33
|
-
}
|
|
34
|
-
}
|
package/stories/all.stories.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { storiesOf } from '@storybook/angular';
|
|
2
|
-
import { withKnobs, object } from '@storybook/addon-knobs';
|
|
3
|
-
|
|
4
|
-
import { ChartsModule } from '../src/charts.module';
|
|
5
|
-
|
|
6
|
-
import { storybookDemoGroups } from '@carbon/charts/demo/data';
|
|
7
|
-
|
|
8
|
-
const getTemplate = (demo) => `
|
|
9
|
-
<div class="container theme--white">
|
|
10
|
-
<div class="v10-banner">
|
|
11
|
-
This version relies on <b>Carbon v11</b>. If you're using Carbon v10, <a href="https://carbon-charts-0x.netlify.app" target="_blank" rel="noreferrer">see the legacy demo site</a>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<h3>
|
|
15
|
-
<b>Component:</b>
|
|
16
|
-
<span class="cds--tag cds--tag--green component-name">${demo.chartType.angular}</span>
|
|
17
|
-
</h3>
|
|
18
|
-
<p class="props"><b>Props:</b> data, <a href="https://carbon-design-system.github.io/carbon-charts/documentation/modules/_interfaces_charts_.html" target="_blank">options</a></p>
|
|
19
|
-
|
|
20
|
-
<div class="marginTop-30" id="chart-demo">
|
|
21
|
-
<${demo.chartType.angular}
|
|
22
|
-
class="n-chart"
|
|
23
|
-
[data]="data"
|
|
24
|
-
[options]="options"
|
|
25
|
-
#${demo.chartType.vanilla}>
|
|
26
|
-
</${demo.chartType.angular}>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<h3 class="marginTop-30">Code sample</h3>
|
|
31
|
-
|
|
32
|
-
<div class="marginTop-30" *ngFor="let codeFile of codeFiles;">
|
|
33
|
-
<h5>{{codeFile}}</h5>
|
|
34
|
-
|
|
35
|
-
<div class="cds--snippet cds--snippet--multi cds--snippet--expand marginTop-15" data-code-snippet>
|
|
36
|
-
<div class="cds--snippet-container" aria-label="Code Snippet Text">
|
|
37
|
-
<pre><code>{{code[codeFile]}}</code></pre>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
|
|
44
|
-
const introStories = storiesOf('Intro', module).addDecorator(withKnobs);
|
|
45
|
-
|
|
46
|
-
// Loop through the demos for the group
|
|
47
|
-
introStories.add('Welcome', () => ({
|
|
48
|
-
template: `<div class="container intro">
|
|
49
|
-
<div
|
|
50
|
-
class="welcome__container"
|
|
51
|
-
style="
|
|
52
|
-
background: url(./welcome.png) no-repeat center center fixed;
|
|
53
|
-
background-size: cover;
|
|
54
|
-
">
|
|
55
|
-
<div class="welcome__content">
|
|
56
|
-
<h2 class="welcome__heading">Carbon Charts</h2>
|
|
57
|
-
<h4 class="welcome__heading welcome__heading--subtitle">(Angular)</h4>
|
|
58
|
-
|
|
59
|
-
<h5 class="welcome__heading welcome__heading--other">Other versions</h5>
|
|
60
|
-
<ul>
|
|
61
|
-
<li><a href="https://charts.carbondesignsystem.com" class="welcome__heading welcome__heading--other">vanilla</a></li>
|
|
62
|
-
<li><a href="https://charts.carbondesignsystem.com/react" class="welcome__heading welcome__heading--other">React</a></li>
|
|
63
|
-
<li><a href="https://charts.carbondesignsystem.com/vue" class="welcome__heading welcome__heading--other">Vue</a></li>
|
|
64
|
-
<li><a href="https://charts.carbondesignsystem.com/svelte" class="welcome__heading welcome__heading--other">Svelte</a></li>
|
|
65
|
-
</ul>
|
|
66
|
-
|
|
67
|
-
<span class="netlify">Deploys by <a href="https://netlify.com" target="_blank">Netlify</a></span>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>`,
|
|
71
|
-
}));
|
|
72
|
-
|
|
73
|
-
// Loop through all demo groups
|
|
74
|
-
storybookDemoGroups.forEach((demoGroup) => {
|
|
75
|
-
// Create story group for each demo group
|
|
76
|
-
const groupStories = storiesOf(
|
|
77
|
-
`${demoGroup.storyGroupTitle}|${demoGroup.title}`,
|
|
78
|
-
module
|
|
79
|
-
).addDecorator(withKnobs({ escapeHTML: false }));
|
|
80
|
-
|
|
81
|
-
// Loop through the demos for the group
|
|
82
|
-
demoGroup.demos.forEach((demo) => {
|
|
83
|
-
if (demo.isHighScale) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
groupStories.add(demo.title, () => ({
|
|
87
|
-
template: getTemplate(demo),
|
|
88
|
-
moduleMetadata: {
|
|
89
|
-
imports: [ChartsModule],
|
|
90
|
-
},
|
|
91
|
-
props: {
|
|
92
|
-
data: object('Data', demo.data),
|
|
93
|
-
options: object('Options', demo.options),
|
|
94
|
-
codeFiles: Object.keys(demo.code.angular),
|
|
95
|
-
code: demo.code.angular,
|
|
96
|
-
},
|
|
97
|
-
}));
|
|
98
|
-
});
|
|
99
|
-
});
|