Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cal-smith committed Mar 25, 2019
2 parents 07ae6ef + 55e8a4d commit 771a791
Show file tree
Hide file tree
Showing 13 changed files with 247 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.11.4](https://github.com/IBM/carbon-charts/compare/v0.11.3...v0.11.4) (2019-03-25)

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





## [0.11.3](https://github.com/IBM/carbon-charts/compare/v0.11.2...v0.11.3) (2019-03-21)

**Note:** Version bump only for package @carbon/charts-monorepo
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
]
}
},
"version": "0.11.3"
"version": "0.11.4"
}
8 changes: 8 additions & 0 deletions packages/angular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.11.4](https://github.com/IBM/carbon-charts/compare/v0.11.3...v0.11.4) (2019-03-25)

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





## [0.7.10](https://github.com/IBM/carbon-charts/compare/v0.7.9...v0.7.10) (2018-11-28)

**Note:** Version bump only for package @carbon/charts-angular
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "./node_modules/ng-packagr/package.schema.json",
"name": "@carbon/charts-angular",
"version": "0.7.10",
"version": "0.11.4",
"description": "Carbon charting components for Angular",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.11.4](https://github.com/IBM/carbon-charts/compare/v0.11.3...v0.11.4) (2019-03-25)

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





# [0.11.0](https://github.com/IBM/carbon-charts/compare/v0.10.5...v0.11.0) (2019-03-12)


Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carbon/charts",
"version": "0.11.0",
"version": "0.11.4",
"description": "Carbon charting components",
"scripts": {
"demo:server": "webpack-dev-server --config webpack.config.js --watch",
Expand Down
8 changes: 8 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.11.4](https://github.com/IBM/carbon-charts/compare/v0.11.3...v0.11.4) (2019-03-25)

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





## [0.11.2](https://github.com/IBM/carbon-charts/compare/v0.11.1...v0.11.2) (2019-03-20)


Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carbon/charts-react",
"version": "0.11.2",
"version": "0.11.4",
"description": "Carbon charting components for React",
"main": "index.js",
"scripts": {
Expand All @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/IBM/carbon-charts#readme",
"dependencies": {
"@carbon/charts": "^0.11.0"
"@carbon/charts": "^0.11.4"
},
"peerDependencies": {
"react": "^16.6.3",
Expand Down
8 changes: 8 additions & 0 deletions packages/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.11.4](https://github.com/carbon-design-system/carbon-charts/compare/v0.11.3...v0.11.4) (2019-03-25)

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





## [0.11.3](https://github.com/carbon-design-system/carbon-charts/compare/v0.11.2...v0.11.3) (2019-03-21)

**Note:** Version bump only for package @carbon/charts-vue
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carbon/charts-vue",
"version": "0.11.3",
"version": "0.11.4",
"description": "Carbon charting components for Vue",
"main": "index.js",
"scripts": {
Expand All @@ -14,7 +14,7 @@
"clean": "rm -rf dist demo/bundle"
},
"dependencies": {
"@carbon/charts": "^0.11.0",
"@carbon/charts": "^0.11.4",
"vue": "2.5.21"
},
"devDependencies": {
Expand Down
20 changes: 20 additions & 0 deletions packages/vue/src/ccv-line-chart.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<div class="ccv-line-chart"></div>
</template>

<script>
import { LineChart } from '@carbon/charts';
import CcvBaseChart from './ccv-base-chart.vue';
export default {
name: 'CcvLineChart',
extends: CcvBaseChart,
mounted() {
this.coreChart = new LineChart(this.$el, {
data: this.data,
options: this.options,
});
},
};
</script>
115 changes: 115 additions & 0 deletions packages/vue/stories/line-demo-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import { colors } from "../helpers/commons";

export const curvedLineData = {
labels: ["Qty", "More", "Sold", "Restocking", "Misc"],
datasets: [
{
label: "Dataset 1",
backgroundColors: [colors[0]],
data: [
65000,
79000,
49213,
51213,
16932
]
},
{
label: "Dataset 2",
backgroundColors: [colors[1]],
data: [
80000,
21312,
56456,
21312,
0
]
},
{
label: "Dataset 3",
backgroundColors: [colors[2]],
data: [
12312,
34232,
39232,
12312,
34234
]
}
]
};

export const curvedLineOptions = {
accessibility: false,
scales: {
x: {
title: "2018 Annual Sales Figures",
},
y: {
formatter: axisValue => `${axisValue / 1000}k`
},
y2: {
ticks: {
max: 1,
min: 0
}
}
},
curve: "curveNatural",
legendClickable: true,
containerResizable: true
};


export const lineData = {
labels: ["Qty", "More", "Sold", "Restocking", "Misc"],
datasets: [
{
label: "Dataset 1",
backgroundColors: [colors[0]],
data: [
0,
0,
0,
0,
0
]
},
{
label: "Dataset 2",
backgroundColors: [colors[1]],
data: [
0,
10000,
20000,
30000,
40000
]
},
{
label: "Dataset 3",
backgroundColors: [colors[2]],
data: [
0,
20000,
40000,
60000,
80000
]
}
]
};

export const lineOptions = {
accessibility: false,
scales: {
x: {
title: "2018 Annual Sales Figures",
},
y: {
formatter: axisValue => `${axisValue / 1000}k`
}
},
legendClickable: true,
containerResizable: true
};
65 changes: 65 additions & 0 deletions packages/vue/stories/line.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { storiesOf } from '@storybook/vue';

import CcvLineChart from '../src/ccv-line-chart';
import {
curvedLineData,
curvedLineOptions,
lineData,
lineOptions
} from './line-demo-data';

const lineStories = storiesOf('Line', module);

lineStories.add('Basic', () => ({
components: { CcvLineChart },
data() {
return { lineData, lineOptions };
},
template:
'<ccv-line-chart :data="lineData" :options="lineOptions"></ccv-line-chart>',
}));

lineStories.add('Natural Curve', () => ({
components: { CcvLineChart },
data() {
return { curvedLineData, curvedLineOptions };
},
template:
'<ccv-line-chart :data="curvedLineData" :options="curvedLineOptions"></ccv-line-chart>',
}));

lineStories.add('Bundle Curve', () => ({
components: { CcvLineChart },
data() {
return {
curvedLineData,
curveBundleOptions: Object.assign({}, curvedLineOptions, {curve: "curveBundle"})
};
},
template:
'<ccv-line-chart :data="curvedLineData" :options="curveBundleOptions"></ccv-line-chart>',
}));

lineStories.add('Monotone Y Curve', () => ({
components: { CcvLineChart },
data() {
return {
curvedLineData,
curveMonotoneYOptions: Object.assign({}, curvedLineOptions, {curve: 'curveMonotoneY'})
};
},
template:
'<ccv-line-chart :data="curvedLineData" :options="curveMonotoneYOptions"></ccv-line-chart>',
}));

lineStories.add('Monotone X Curve', () => ({
components: { CcvLineChart },
data() {
return {
curvedLineData,
curveMonotoneXOptions: Object.assign({}, curvedLineOptions, {curve: "curveMonotoneX"})
};
},
template:
'<ccv-line-chart :data="curvedLineData" :options="curveMonotoneXOptions"></ccv-line-chart>',
}));

0 comments on commit 771a791

Please sign in to comment.