-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add diplodoc documentation (#24)
- Loading branch information
Showing
57 changed files
with
12,805 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test documentation deployment | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-docs-deploy: | ||
name: Test documentation deployment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
- name: Install tsconfig | ||
run: npm i @gravity-ui/tsconfig | ||
- name: Install dependencies | ||
run: npm run docs:deps | ||
- name: Build | ||
run: npm run docs:build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Documentation Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
name: Build and Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
- name: Install tsconfig | ||
run: npm i @gravity-ui/tsconfig | ||
- name: Install dependencies | ||
run: npm run docs:deps | ||
shell: bash | ||
- name: Build | ||
run: npm run docs:build | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist-docs | ||
cname: gravity-ui.com | ||
user_name: 'github-actions[bot]' | ||
user_email: 'github-actions[bot]@users.noreply.github.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,8 @@ node_modules | |
|
||
# Artifacts | ||
dist | ||
dist-docs | ||
docs/diplodoc/pages/api | ||
storybook-static | ||
.cache | ||
.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
allowHTML: true | ||
staticContent: true | ||
addSystemMeta: true | ||
lang: en | ||
langs: | ||
- en | ||
search: | ||
provider: local | ||
confidence: phrased | ||
tolerance: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
title: Gravity UI Charts | ||
base: ./ | ||
meta: | ||
title: Gravity UI Charts | ||
noIndex: true | ||
links: | ||
- title: Overview | ||
href: ./pages/overview.md | ||
- title: Get started | ||
href: ./pages/get-started.md | ||
- title: API | ||
href: ./pages/api/overview.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Get started | ||
|
||
## Install | ||
|
||
```shell | ||
npm install @gravity-ui/uikit @gravity-ui/charts | ||
``` | ||
|
||
## Development | ||
|
||
To start the development server with storybook run the following: | ||
|
||
```shell | ||
npm run start | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Overview | ||
|
||
## About Gravity UI Charts | ||
|
||
**Gravity UI Charts** is a charting library built with [D3](https://d3js.org/) and [React](https://react.dev/). It's designed as part of the [Gravity UI](https://gravity-ui.com/) ecosystem and provides powerful data visualization capabilities for modern web applications through simple configuration objects. | ||
|
||
{% note warning %} | ||
|
||
While the library is in version `0.*.*`, minor releases may include incompatible changes to the API. | ||
|
||
{% endnote %} | ||
|
||
## What you can already do with Gravity UI Charts | ||
|
||
We have already implemented support for the main chart types: | ||
|
||
- `Area` | ||
- `Bar-X` | ||
- `Bar-Y` | ||
- `Line` | ||
- `Pie` | ||
- `Scatter` | ||
- `Treemap` (partial support) | ||
- `Waterfall` (partial support) | ||
|
||
{% cut "Examples from Storybook" %} | ||
|
||
<iframe | ||
src="https://preview.gravity-ui.com/charts/iframe.html?args=&globals=&id=showcase--d-3-showcase-story&viewMode=story" | ||
width="100%" | ||
height="400" | ||
></iframe> | ||
|
||
{% endcut %} | ||
|
||
## Roadmap | ||
|
||
We are actively working on library development and continuously improving its features. Here is the list of the priority major features: | ||
|
||
- ⏳ Handling null data [#28](https://github.com/gravity-ui/charts/issues/28) | ||
- ⏳ Charts zooming [#29](https://github.com/gravity-ui/charts/issues/29) | ||
- ⏳ Plot lines, bands [#30](https://github.com/gravity-ui/charts/issues/30) | ||
- ⏳ Charts navigator [#35](https://github.com/gravity-ui/charts/issues/35) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
title: '' | ||
href: index.yaml | ||
navigation: | ||
logo: | ||
url: '/charts' | ||
dark: | ||
icon: https://storage.yandexcloud.net/gravity-ui-assets/gravity-logo-dark.svg | ||
text: Charts | ||
light: | ||
icon: https://storage.yandexcloud.net/gravity-ui-assets/gravity-logo-light.svg | ||
text: Charts | ||
header: | ||
leftItems: | ||
- text: Github ➚ | ||
type: link | ||
url: https://github.com/gravity-ui/charts | ||
rightItems: | ||
- type: controls | ||
- type: search | ||
items: | ||
- name: Overview | ||
href: ./pages/overview.md | ||
- name: Get started | ||
href: ./pages/get-started.md | ||
- name: API | ||
href: ./pages/api | ||
autodoc: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"pathToTocFile": "./diplodoc/toc.yaml", | ||
"pathToDocsFolder": "./diplodoc" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const {exec} = require('node:child_process'); | ||
const path = require('node:path'); | ||
|
||
const browserSync = require('browser-sync').create(); | ||
const {watch, series, parallel} = require('gulp'); | ||
|
||
const DIST_PATH = '../dist-docs'; | ||
|
||
function build(cb) { | ||
exec('npm run docs:build', (err, stdout, stderr) => { | ||
process.stdout.write(stdout); | ||
process.stdout.write(stderr); | ||
cb(err); | ||
}); | ||
} | ||
|
||
function serve(cb) { | ||
browserSync.init({server: path.resolve(DIST_PATH), port: 7007}); | ||
cb(); | ||
} | ||
|
||
function reload(cb) { | ||
browserSync.reload(); | ||
cb(); | ||
} | ||
|
||
function watchFiles() { | ||
watch(['./diplodoc/**/*', './src/**/*', '../src/**/*'], series(build, reload)); | ||
} | ||
|
||
exports.default = series(build, parallel(serve, watchFiles)); |
Oops, something went wrong.