Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect addSpaceOnEdges when initializing axes #688

Merged
merged 4 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ setOptions({
sortStoriesByKind: true,
panelPosition: "bottom",
showDownPanel: true,
theme,
theme
});

const req = require.context("../stories", true, /.stories.ts$/);
Expand Down
12 changes: 6 additions & 6 deletions packages/core/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ module.exports = {
loader: "sass-loader",
options: {
sassOptions: {
includePaths: [path.resolve(__dirname + "../src")],
},
},
},
],
includePaths: [path.resolve(__dirname + "../src")]
}
}
}
]
});

return config;
},
}
};
4 changes: 2 additions & 2 deletions packages/core/.storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
ui01,
ui03,
ui04,
uiBackground,
uiBackground
} = g10;
const { uiBackground: secondaryColor } = g100;

Expand Down Expand Up @@ -42,5 +42,5 @@ export default create({
inputBg: field01,
inputBorder: ui03,
inputTextColor: text01,
inputBorderRadius: 0,
inputBorderRadius: 0
});
486 changes: 316 additions & 170 deletions packages/core/CHANGELOG.md

Large diffs are not rendered by default.

26 changes: 18 additions & 8 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,36 @@ instead:
yarn add @carbon/charts d3
```

**Note:** you'd also need to install `carbon-components` if you're not using a bundled version of the library.
**Note:** you'd also need to install `carbon-components` if you're not using a
bundled version of the library.

## Step-by-step instructions

Read [here](https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials-getting-started--vanilla)
Read
[here](https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials-getting-started--vanilla)

## Codesandbox examples

[Sample use cases can be seen here](https://carbon-design-system.github.io/carbon-charts).

**When opening the link above**, click on the **Edit on Codesandbox** button for each demo to see an isolated project showing you how to reproduce the demo.
**When opening the link above**, click on the **Edit on Codesandbox** button for
each demo to see an isolated project showing you how to reproduce the demo.

## Charting data & options

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.
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.

For instance in the case of a donut chart you're able to pass in an additional field called `center` in your options configuring the donut center.
For instance in the case of a donut chart you're able to pass in an additional
field called `center` in your options configuring the donut center.

For instructions on using the **tabular data format**, see [here](https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format)
For instructions on using the **tabular data format**, see
[here](https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format)

There are also additional options available depending on the chart type being used, [see our demo examples here](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/core/demo/data).
There are also additional options available depending on the chart type being
used,
[see our demo examples here](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/core/demo/data).

Customizable options (specific to chart type) can be found [here](https://carbon-design-system.github.io/carbon-charts/documentation/modules/_interfaces_charts_.html)
Customizable options (specific to chart type) can be found
[here](https://carbon-design-system.github.io/carbon-charts/documentation/modules/_interfaces_charts_.html)
38 changes: 19 additions & 19 deletions packages/core/demo/create-codesandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@ new ${chartComponent}(chartHolder, {
const packageJson = {
scripts: {
start: "parcel index.html --open",
build: "parcel build index.html",
build: "parcel build index.html"
},
dependencies: {
"@carbon/charts": libraryVersion,
"carbon-components": carbonComponentsVersion,
d3: "5.9.2",
d3: "5.9.2"
},
devDependencies: {
"parcel-bundler": "^1.6.1",
},
"parcel-bundler": "^1.6.1"
}
};

return {
"index.html": indexHtml,
"src/index.js": indexJs,
"package.json": packageJson,
"package.json": packageJson
};
};

Expand Down Expand Up @@ -115,15 +115,15 @@ ReactDOM.render(<App />, document.getElementById("root"));
react: "16.12.0",
"react-dom": "16.12.0",
"react-scripts": "3.0.1",
"carbon-components": carbonComponentsVersion,
},
"carbon-components": carbonComponentsVersion
}
};

return {
"src/index.html": indexHtml,
"src/index.js": indexJs,
"src/ibm-plex-font.css": ibmPlexFontCSS,
"package.json": packageJson,
"package.json": packageJson
};
};

Expand Down Expand Up @@ -216,8 +216,8 @@ platformBrowserDynamic()
"core-js": "3.6.0",
d3: "5.15.0",
rxjs: "6.5.3",
"zone.js": "0.10.2",
},
"zone.js": "0.10.2"
}
},
null,
"\t"
Expand All @@ -231,7 +231,7 @@ platformBrowserDynamic()
"src/app/ibm-plex-font.css": ibmPlexFontCSS,
"src/app/app.module.ts": appModule,
".angular-cli.json": angularCliJson,
"package.json": packageJson,
"package.json": packageJson
};
};

Expand Down Expand Up @@ -297,8 +297,8 @@ new Vue({
"@vue/cli-plugin-babel": "4.1.1",
"carbon-components": carbonComponentsVersion,
d3: "5.15.0",
vue: "^2.6.11",
},
vue: "^2.6.11"
}
},
null,
"\t\t"
Expand All @@ -309,7 +309,7 @@ new Vue({
"src/ibm-plex-font.css": ibmPlexFontCSS,
"src/App.vue": appVue,
"src/main.js": mainJs,
"package.json": packageJson,
"package.json": packageJson
};
};

Expand Down Expand Up @@ -358,7 +358,7 @@ export default app;
autobuild: "rollup -c -w",
dev: "run-p start:dev autobuild",
start: "sirv public",
"start:dev": "sirv public --dev",
"start:dev": "sirv public --dev"
},
devDependencies: {
"npm-run-all": "^4.1.5",
Expand All @@ -367,15 +367,15 @@ export default app;
"rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^4.0.4",
"sirv-cli": "^0.3.1",
"sirv-cli": "^0.3.1"
},
dependencies: {
"@carbon/charts": libraryVersion,
"@carbon/charts-svelte": libraryVersion,
"carbon-components": carbonComponentsVersion,
d3: "5.12.0",
svelte: "3.20.x",
},
svelte: "3.20.x"
}
};

const rollup = `import svelte from "rollup-plugin-svelte";
Expand Down Expand Up @@ -413,6 +413,6 @@ export default {
"App.svelte": App,
"index.js": indexJs,
"package.json": packageJson,
"rollup.config.js": rollup,
"rollup.config.js": rollup
};
};
Loading