@gravity-ui/chartkit
TypeScript icon, indicating that this package has built-in type declarations

5.19.1 • Public • Published

@gravity-ui/chartkit · license npm package storybook

React component used to render charts based on any sources you need

Install

npm i --save-dev @gravity-ui/chartkit @gravity-ui/uikit

Make sure you have @gravity-ui/uikit styles enabled in your project.

import '@gravity-ui/uikit/styles/styles.scss';

Usage

import {ThemeProvider} from '@gravity-ui/uikit';
import ChartKit, {settings} from '@gravity-ui/chartkit';
import {YagrPlugin} from '@gravity-ui/chartkit/yagr';
import type {YagrWidgetData} from '@gravity-ui/chartkit/yagr';

import '@gravity-ui/uikit/styles/styles.scss';

settings.set({plugins: [YagrPlugin]});

const data: YagrWidgetData = {
  data: {
    timeline: [
      1636838612441, 1636925012441, 1637011412441, 1637097812441, 1637184212441, 1637270612441,
      1637357012441, 1637443412441, 1637529812441, 1637616212441,
    ],
    graphs: [
      {
        id: '0',
        name: 'Serie 1',
        color: '#6c59c2',
        data: [25, 52, 89, 72, 39, 49, 82, 59, 36, 5],
      },
      {
        id: '1',
        name: 'Serie 2',
        color: '#6e8188',
        data: [37, 6, 51, 10, 65, 35, 72, 0, 94, 54],
      },
    ],
  },
  libraryConfig: {
    chart: {
      series: {
        type: 'line',
      },
    },
    title: {
      text: 'line: random 10 pts',
    },
  },
};

function App() {
  return (
    <ThemeProvider>
      <div className="app" style={{height: 500}}>
        <ChartKit type="yagr" data={data} />
      </div>
    </ThemeProvider>
  );
}

export default App;

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.0.0-beta.70beta
5.19.1430latest
4.23.31untagged

Version History

VersionDownloads (Last 7 Days)Published
5.19.1430
5.19.03
5.18.11
5.18.01
5.17.121
5.17.02
5.16.01
5.15.00
5.14.10
5.14.07
5.13.00
5.12.00
5.11.22
5.11.10
5.11.018
5.10.23
5.10.1169
5.10.01
5.9.099
5.8.00
5.7.00
5.6.00
5.5.01
5.4.00
5.3.30
5.3.20
4.23.31
5.3.10
5.3.00
5.2.20
4.23.20
4.23.11
5.2.10
5.2.01
4.23.00
4.22.10
4.22.00
4.21.10
4.21.00
4.20.20
5.1.00
5.0.02
4.20.10
4.20.00
4.19.10
4.19.00
4.18.21
4.18.10
4.18.00
4.17.00
4.16.00
4.15.00
4.14.00
4.13.00
4.12.00
4.11.00
4.10.10
4.10.00
4.9.30
4.9.20
4.9.10
4.9.00
4.8.01
4.7.33
4.7.22
4.7.11
4.7.01
4.6.10
4.6.00
4.5.01
4.4.10
4.4.00
4.3.00
4.2.00
4.1.01
4.0.01
3.7.01
4.0.0-beta.70
4.0.0-beta.61
4.0.0-beta.51
4.0.0-beta.40
4.0.0-beta.30
4.0.0-beta.21
4.0.0-beta.10
3.6.00
3.5.00
3.4.31
3.4.20
3.4.11
3.4.00
3.3.01
3.2.0-beta.20
3.2.0-beta.10
3.2.00
3.1.30
3.1.20
3.0.0-beta.181
3.1.10
3.0.0-beta.170
3.0.0-beta.160
3.0.0-beta.150
3.0.0-beta.zefirka.140
3.0.0-beta.zefirka.130
3.1.02
3.0.0-beta.zefirka.120
3.0.0-beta.zefirka.111
3.0.0-beta.zefirka.100
3.0.0-beta.zefirka.91
3.0.01
3.0.0-beta.zefirka.80
3.0.0-beta.zefirka.70
3.0.0-beta.zefirka.60
3.0.0-beta.zefirka.51
3.0.0-beta.zefirka.40
3.0.0-beta.zefirka.31
3.0.0-beta.zefirka.20
3.0.0-beta.zefirka.10
3.0.0-beta.110
3.0.0-beta.101
3.0.0-beta.90
3.0.0-beta.81
3.0.0-beta.70
3.0.0-beta.60
3.0.0-beta.51
3.0.0-beta.40
3.0.0-beta.31
3.0.0-beta.20
2.13.00
2.12.01
3.0.0-beta.10
3.0.0-beta.00
2.11.1-beta.00
2.11.01
2.10.10
2.10.01
2.9.00
2.8.11
2.8.00
2.7.20
2.7.10
2.7.00
2.6.00
2.5.00
2.4.10
2.4.00
2.3.10
2.3.00
2.2.20
2.2.10
2.2.00
2.1.00
2.0.00
1.6.70
1.6.60
1.6.50
1.6.40
1.6.30
1.6.20
1.6.10
1.6.00
1.5.20
1.5.10
1.5.00
1.4.30
1.4.20
1.4.10
1.4.00
1.3.00
1.2.00
1.1.00
1.0.00
0.13.00
0.12.30
0.12.20
0.12.10
0.12.01
0.11.11
0.11.00
0.10.10
0.10.00
0.9.10
0.9.00
0.8.00
0.7.20

Package Sidebar

Install

npm i @gravity-ui/chartkit

Weekly Downloads

550

Version

5.19.1

License

MIT

Unpacked Size

473 kB

Total Files

310

Last publish

Collaborators

  • resure
  • amje
  • gravity-ui-bot