Skip to content

Commit 43cd481

Browse files
Merge branch 'master' of https://github.com/carbon-design-system/carbon-charts into feat-axis-smallscale
2 parents f810d4a + 10b7c8d commit 43cd481

File tree

161 files changed

+1119
-894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+1119
-894
lines changed

Diff for: .nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
11

Diff for: .travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
dist: trusty
22
language: node_js
33
node_js:
4-
- '8'
4+
- '11'
55
env:
66
- MOZ_HEADLESS=1
77
addons:
88
chrome: stable
99
firefox: latest
1010
if: (tag AND tag =~ ^v) OR (commit_message =~ ^Merge\spull\srequest\s#) OR (type = pull_request)
1111
before_install:
12-
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
12+
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1
1313
- export PATH="$HOME/.yarn/bin:$PATH"
1414
- .travis/before_install.sh
1515
- "google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &"
1616
install: yarn --offline
1717
script:
18-
- lerna run lint
19-
- lerna run test
18+
- yarn run lint
19+
- yarn run test
2020
- yarn run build-all
2121
sudo: false
2222
deploy:

Diff for: .travis/before_install.sh

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
#!/usr/bin/env bash
22

33
set -e
4-
5-
yarn global add [email protected]

Diff for: CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.22.1](https://github.com/IBM/carbon-charts/compare/v0.22.0...v0.22.1) (2019-12-12)
7+
8+
9+
### Bug Fixes
10+
11+
* **charts-angular:** update build toolchain ([aa63925](https://github.com/IBM/carbon-charts/commit/aa63925))
12+
13+
14+
15+
16+
17+
# [0.22.0](https://github.com/IBM/carbon-charts/compare/v0.21.0...v0.22.0) (2019-12-09)
18+
19+
20+
### Features
21+
22+
* **core, angular, react, vue:** Update chart width & height through options ([f050c35](https://github.com/IBM/carbon-charts/commit/f050c35))
23+
24+
25+
26+
27+
28+
# [0.21.0](https://github.com/IBM/carbon-charts/compare/v0.20.1...v0.21.0) (2019-12-09)
29+
30+
31+
### Features
32+
33+
* **core, angular, react, vue:** allow customizations to pie labels & the donut center number ([#427](https://github.com/IBM/carbon-charts/issues/427)) ([0446045](https://github.com/IBM/carbon-charts/commit/0446045))
34+
35+
36+
37+
38+
639
## [0.20.1](https://github.com/IBM/carbon-charts/compare/v0.20.0...v0.20.1) (2019-12-04)
740

841

Diff for: README.md

+5-65
Original file line numberDiff line numberDiff line change
@@ -17,71 +17,11 @@
1717
</p>
1818
</p>
1919

20-
## Table of contents
21-
22-
- [Installation](#installation)
23-
- [Demo & Docs](#demo-and-documentation)
24-
- [Run Charts locally](#run-charts-locally)
25-
- [Component status](#component-status)
26-
- [Bugs and feature requests](#bugs-and-feature-requests)
27-
- [Contributing](#contributing)
28-
29-
## Getting started
30-
31-
### Installation
32-
33-
Run:
34-
```bash
35-
yarn global add @storybook/cli
36-
37-
yarn add @carbon/charts
38-
```
39-
40-
Or if you use NPM:
41-
```bash
42-
npm i -g @storybook/cli
43-
44-
npm install @carbon/charts --save
45-
```
46-
47-
## Demo and documentation
48-
**Charts demos:**
49-
- [Vanilla JS](https://carbon-design-system.github.io/carbon-charts/)
50-
- [Angular](https://carbon-design-system.github.io/carbon-charts/angular)
51-
- [React](https://carbon-design-system.github.io/carbon-charts/react)
52-
- [Vue](https://carbon-design-system.github.io/carbon-charts/vue)
53-
54-
**Docs:** <https://carbon-design-system.github.io/carbon-charts/documentation/>
55-
56-
### Code Samples
57-
<p align="center">
58-
<img src="assets/demo-stacked-bar.png" alt="Stacked Bar Chart" width="600" />
59-
</p>
60-
61-
<p align="center">
62-
<a href="https://codesandbox.io/s/149vrzo62l">
63-
<img src="https://codesandbox.io/static/img/play-codesandbox.svg" alt="Edit Carbon Charts - Vanilla" />
64-
</a>
65-
</p>
66-
67-
- [Vanilla JS](https://codesandbox.io/s/149vrzo62l)
68-
- [Angular](https://codesandbox.io/s/k32kjy5qnr)
69-
- [React](https://codesandbox.io/s/pppmo3ollx)
70-
- [Vue](https://codesandbox.io/s/040w2rqrxp)
71-
72-
### Run Charts locally
73-
1. Fork the project and clone your fork:
74-
75-
```bash
76-
# Clone your fork of the repo into the current directory
77-
git clone [email protected]:<your-username>/carbon-charts.git
78-
# Navigate to the newly cloned directory
79-
cd carbon-charts
80-
```
81-
82-
2. Run `yarn` to install Node.js dependencies.
83-
3. Run `yarn run demo:server` to serve up the demo locally.
84-
4. Finally, open <http://localhost:9001/> in your browser. SPOILER ALERT: There's no "Hello, World!"
20+
## Packages
21+
- [Vanilla](./packages/core)
22+
- [Angular](./packages/angular)
23+
- [React](./packages/react)
24+
- [Vue](./packages/vue)
8525

8626
## Component status
8727
:white_check_mark: Stable :hourglass_flowing_sand: In progress

Diff for: lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
]
1313
}
1414
},
15-
"version": "0.20.1"
15+
"version": "0.22.1"
1616
}

Diff for: packages/angular/CHANGELOG.md

+30
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.22.1](https://github.com/IBM/carbon-charts/compare/v0.22.0...v0.22.1) (2019-12-12)
7+
8+
9+
### Bug Fixes
10+
11+
* **charts-angular:** update build toolchain ([aa63925](https://github.com/IBM/carbon-charts/commit/aa63925))
12+
13+
14+
15+
16+
17+
# [0.22.0](https://github.com/IBM/carbon-charts/compare/v0.21.0...v0.22.0) (2019-12-09)
18+
19+
20+
### Features
21+
22+
* **core, angular, react, vue:** Update chart width & height through options ([f050c35](https://github.com/IBM/carbon-charts/commit/f050c35))
23+
24+
25+
26+
27+
28+
# [0.21.0](https://github.com/IBM/carbon-charts/compare/v0.20.1...v0.21.0) (2019-12-09)
29+
30+
**Note:** Version bump only for package @carbon/charts-angular
31+
32+
33+
34+
35+
636
## [0.20.1](https://github.com/IBM/carbon-charts/compare/v0.20.0...v0.20.1) (2019-12-04)
737

838
**Note:** Version bump only for package @carbon/charts-angular

Diff for: packages/angular/README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,29 @@
44
55
**[Storybook Demos](https://carbon-design-system.github.io/carbon-charts/angular)**
66

7+
**[Storybook Demo Sources](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/angular/stories)**
8+
79
## Getting Started
810

911
Run the following command using [npm](https://www.npmjs.com/):
1012

1113
```bash
12-
npm install -S @carbon/charts-angular
14+
npm install -S @carbon/charts @carbon/charts-angular d3
1315
```
1416

1517
If you prefer [Yarn](https://yarnpkg.com/en/), use the following command
1618
instead:
1719

1820
```bash
19-
yarn add @carbon/charts-angular
21+
yarn add @carbon/charts @carbon/charts-angular d3
2022
```
2123

22-
## Sample Project
23-
[Edit on Stackblitz](https://stackblitz.com/edit/carbon-charts-angular-vznxot)
24+
## Step-by-step Instructions
25+
[Read on carbondesignsystem.com](https://www.carbondesignsystem.com/data-visualization/getting-started/angular)
26+
27+
## Charting Data & Options
28+
Although we will definitely introduce new models in the future as we start shipping new components such as maps, Data and options follow the same model in all charts, with minor exceptions and differences in specific components, .
29+
30+
For instance, in the case of pie and donut charts, you would only provide one data set. In the case of donut charts, you can pass in an additional field called `center` in your options configuring the donut center.
31+
32+
There are also additional options available depending on the chart type being used, [for more examples please see here](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/core/demo/demo-data).

Diff for: packages/angular/angular.json

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"charts-angular": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "library",
10+
"prefix": "sc",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-ng-packagr:build",
14+
"options": {
15+
"tsConfig": "./tsconfig.json",
16+
"project": "./ng-package.json"
17+
}
18+
},
19+
"test": {
20+
"builder": "@angular-devkit/build-angular:karma",
21+
"options": {
22+
"main": "src/test.ts",
23+
"karmaConfig": "./karma.conf.js",
24+
"tsConfig": "./tsconfig.spec.json"
25+
}
26+
},
27+
"lint": {
28+
"builder": "@angular-devkit/build-angular:tslint",
29+
"options": {
30+
"tsConfig": [
31+
"./tsconfig.json",
32+
"./tsconfig.spec.json"
33+
],
34+
"exclude": [
35+
"**/node_modules/**"
36+
]
37+
}
38+
}
39+
}
40+
},
41+
"charts-angular-e2e": {
42+
"root": "e2e",
43+
"sourceRoot": "e2e",
44+
"projectType": "application",
45+
"architect": {
46+
"e2e": {
47+
"builder": "@angular-devkit/build-angular:protractor",
48+
"options": {
49+
"protractorConfig": "./protractor.conf.js",
50+
"devServerTarget": "charts-angular:serve"
51+
}
52+
},
53+
"lint": {
54+
"builder": "@angular-devkit/build-angular:tslint",
55+
"options": {
56+
"tsConfig": [
57+
"e2e/tsconfig.e2e.json"
58+
],
59+
"exclude": [
60+
"**/node_modules/**/*"
61+
]
62+
}
63+
}
64+
}
65+
}
66+
},
67+
"defaultProject": "charts-angular",
68+
"schematics": {
69+
"@schematics/angular:component": {
70+
"prefix": "ibm",
71+
"styleext": "css"
72+
},
73+
"@schematics/angular:directive": {
74+
"prefix": "ibm"
75+
}
76+
}
77+
}

Diff for: packages/angular/ng-package.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "./dist",
4+
"lib": {
5+
"entryFile": "src/index.ts"
6+
},
7+
"whitelistedNonPeerDependencies": [
8+
"@carbon/charts"
9+
]
10+
}

Diff for: packages/angular/package.json

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
2-
"$schema": "../../node_modules/ng-packagr/package.schema.json",
32
"name": "@carbon/charts-angular",
4-
"version": "0.20.1",
3+
"version": "0.22.1",
54
"description": "Carbon charting components for Angular",
65
"main": "index.js",
76
"scripts": {
8-
"build": "ng-packagr -p package.json",
7+
"build": "ng build",
98
"storybook": "start-storybook -p 9005 -c .storybook -s ./.storybook/assets",
109
"demo:build": "build-storybook -o demo/bundle --quiet",
1110
"clean": "rm -rf dist demo/bundle"
@@ -40,7 +39,7 @@
4039
"scss"
4140
],
4241
"dependencies": {
43-
"@carbon/charts": "^0.20.1"
42+
"@carbon/charts": "^0.22.1"
4443
},
4544
"peerDependencies": {
4645
"@angular/common": "^6.0.0 || ^7.0.0",
@@ -50,9 +49,11 @@
5049
"zone.js": "^0.8.29 || ^0.9.0"
5150
},
5251
"devDependencies": {
53-
"@angular-devkit/build-angular": "0.8.9",
54-
"@angular-devkit/core": "0.8.9",
52+
"@angular-devkit/build-angular": "0.13.0",
53+
"@angular-devkit/build-ng-packagr": "0.13.0",
54+
"@angular-devkit/core": "8.2.2",
5555
"@angular/animations": "7.2.15",
56+
"@angular/cli": "~7.3.9",
5657
"@angular/common": "7.2.15",
5758
"@angular/compiler": "7.2.15",
5859
"@angular/compiler-cli": "7.2.15",
@@ -69,18 +70,12 @@
6970
"d3": "4.11.0",
7071
"ng-packagr": "5.7.1",
7172
"rxjs": "6.3.3",
72-
"tslint": "5.14.0",
73+
"tsickle": "0.37.1",
74+
"tslib": "1.10.0",
75+
"tslint": "5.20.1",
7376
"typescript": "3.2.2",
7477
"zone.js": "0.8.29"
7578
},
76-
"ngPackage": {
77-
"lib": {
78-
"entryFile": "src/charts.module.ts"
79-
},
80-
"whitelistedNonPeerDependencies": [
81-
"@carbon/charts"
82-
]
83-
},
8479
"publishConfig": {
8580
"access": "public"
8681
},

Diff for: packages/angular/src/bar-chart-grouped.component.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@ import { GroupedBarChart } from "@carbon/charts";
1414
*/
1515
@Component({
1616
selector: "ibm-grouped-bar-chart",
17-
template: `
18-
<div #nChart class="ibm-chart-container">
19-
</div>
20-
`
17+
template: ``
2118
})
2219
export class GroupedBarChartComponent extends BaseChart implements AfterViewInit {
2320
/**
24-
* Runs after view init to create a chart, attach it to `chartRef` and draw it.
21+
* Runs after view init to create a chart, attach it to `elementRef` and draw it.
2522
*/
2623
ngAfterViewInit() {
2724
this.chart = new GroupedBarChart(
28-
this.chartRef.nativeElement,
25+
this.elementRef.nativeElement,
2926
{
3027
data: this.data,
3128
options: this.options

0 commit comments

Comments
 (0)