@carbon/charts-react 1.7.6 → 1.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -13
- package/dist/charts/AlluvialChart.d.ts +5 -0
- package/dist/charts/AreaChart.d.ts +5 -0
- package/dist/charts/BaseChart.d.ts +16 -0
- package/dist/charts/BoxplotChart.d.ts +5 -0
- package/dist/charts/BubbleChart.d.ts +5 -0
- package/dist/charts/BulletChart.d.ts +5 -0
- package/dist/charts/ChoroplethChart.d.ts +5 -0
- package/dist/charts/CirclePackChart.d.ts +5 -0
- package/dist/charts/ComboChart.d.ts +5 -0
- package/dist/charts/DonutChart.d.ts +5 -0
- package/dist/charts/GaugeChart.d.ts +5 -0
- package/dist/charts/GroupedBarChart.d.ts +5 -0
- package/dist/charts/HeatmapChart.d.ts +5 -0
- package/dist/charts/HistogramChart.d.ts +5 -0
- package/dist/charts/LineChart.d.ts +5 -0
- package/dist/charts/LollipopChart.d.ts +5 -0
- package/dist/charts/MeterChart.d.ts +5 -0
- package/dist/charts/PieChart.d.ts +5 -0
- package/dist/charts/RadarChart.d.ts +5 -0
- package/dist/charts/ScatterChart.d.ts +5 -0
- package/dist/charts/SimpleBarChart.d.ts +5 -0
- package/dist/charts/StackedAreaChart.d.ts +5 -0
- package/dist/charts/StackedBarChart.d.ts +5 -0
- package/dist/charts/TreeChart.d.ts +5 -0
- package/dist/charts/TreemapChart.d.ts +5 -0
- package/dist/charts/WordCloudChart.d.ts +5 -0
- package/dist/charts/index.d.ts +26 -0
- package/dist/diagrams/CardNode.d.ts +12 -0
- package/dist/diagrams/CardNodeColumn.d.ts +7 -0
- package/dist/diagrams/CardNodeLabel.d.ts +6 -0
- package/dist/diagrams/CardNodeSubtitle.d.ts +6 -0
- package/dist/diagrams/CardNodeTitle.d.ts +6 -0
- package/dist/diagrams/Edge.d.ts +17 -0
- package/dist/diagrams/Marker.d.ts +20 -0
- package/dist/diagrams/ShapeNode.d.ts +17 -0
- package/dist/diagrams/index.d.ts +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +23083 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +28264 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.min.css +1 -0
- package/dist/styles.min.css.map +1 -0
- package/package.json +96 -57
- package/CHANGELOG.md +0 -2107
- package/alluvial-chart.d.ts +0 -12
- package/alluvial-chart.js +0 -42
- package/area-chart-stacked.d.ts +0 -12
- package/area-chart-stacked.js +0 -42
- package/area-chart.d.ts +0 -12
- package/area-chart.js +0 -42
- package/bar-chart-grouped.d.ts +0 -12
- package/bar-chart-grouped.js +0 -42
- package/bar-chart-simple.d.ts +0 -12
- package/bar-chart-simple.js +0 -42
- package/bar-chart-stacked.d.ts +0 -12
- package/bar-chart-stacked.js +0 -42
- package/base-chart.d.ts +0 -17
- package/base-chart.js +0 -46
- package/boxplot-chart.d.ts +0 -12
- package/boxplot-chart.js +0 -42
- package/bubble-chart.d.ts +0 -12
- package/bubble-chart.js +0 -42
- package/bullet-chart.d.ts +0 -12
- package/bullet-chart.js +0 -42
- package/bundle.js +0 -1
- package/circle-pack-chart.d.ts +0 -12
- package/circle-pack-chart.js +0 -42
- package/combo-chart.d.ts +0 -12
- package/combo-chart.js +0 -42
- package/diagrams/CardNode/CardNode.d.ts +0 -54
- package/diagrams/CardNode/CardNode.js +0 -84
- package/diagrams/CardNode/CardNodeColumn.d.ts +0 -19
- package/diagrams/CardNode/CardNodeColumn.js +0 -37
- package/diagrams/CardNode/CardNodeLabel.d.ts +0 -15
- package/diagrams/CardNode/CardNodeLabel.js +0 -32
- package/diagrams/CardNode/CardNodeSubtitle.d.ts +0 -15
- package/diagrams/CardNode/CardNodeSubtitle.js +0 -32
- package/diagrams/CardNode/CardNodeTitle.d.ts +0 -15
- package/diagrams/CardNode/CardNodeTitle.js +0 -32
- package/diagrams/CardNode/index.d.ts +0 -6
- package/diagrams/CardNode/index.js +0 -16
- package/diagrams/Edge/Edge.d.ts +0 -65
- package/diagrams/Edge/Edge.js +0 -94
- package/diagrams/Edge/index.d.ts +0 -2
- package/diagrams/Edge/index.js +0 -7
- package/diagrams/Marker/Marker.d.ts +0 -66
- package/diagrams/Marker/Marker.js +0 -120
- package/diagrams/Marker/index.d.ts +0 -1
- package/diagrams/Marker/index.js +0 -14
- package/diagrams/ShapeNode/ShapeNode.d.ts +0 -68
- package/diagrams/ShapeNode/ShapeNode.js +0 -101
- package/diagrams/ShapeNode/index.d.ts +0 -2
- package/diagrams/ShapeNode/index.js +0 -7
- package/diagrams/configs.js +0 -4
- package/donut-chart.d.ts +0 -12
- package/donut-chart.js +0 -42
- package/gauge-chart.d.ts +0 -12
- package/gauge-chart.js +0 -42
- package/heatmap-chart.d.ts +0 -12
- package/heatmap-chart.js +0 -42
- package/histogram-chart.d.ts +0 -12
- package/histogram-chart.js +0 -42
- package/index.d.ts +0 -25
- package/index.js +0 -54
- package/line-chart.d.ts +0 -12
- package/line-chart.js +0 -42
- package/lollipop-chart.d.ts +0 -12
- package/lollipop-chart.js +0 -42
- package/meter-chart.d.ts +0 -12
- package/meter-chart.js +0 -42
- package/pie-chart.d.ts +0 -12
- package/pie-chart.js +0 -42
- package/radar-chart.d.ts +0 -12
- package/radar-chart.js +0 -42
- package/scatter-chart.d.ts +0 -12
- package/scatter-chart.js +0 -42
- package/tree-chart.d.ts +0 -12
- package/tree-chart.js +0 -42
- package/treemap-chart.d.ts +0 -12
- package/treemap-chart.js +0 -42
- package/utils.d.ts +0 -1
- package/utils.js +0 -9
- package/wordcloud-chart.d.ts +0 -12
- package/wordcloud-chart.js +0 -42
- /package/{diagrams/configs.d.ts → dist/diagrams/utils.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -18,15 +18,14 @@ Run the following command using [npm](https://www.npmjs.com/):
|
|
|
18
18
|
npm install -S @carbon/charts @carbon/charts-react d3
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
If you prefer [Yarn](https://yarnpkg.com/en/), use the following command
|
|
22
|
-
instead:
|
|
21
|
+
If you prefer [Yarn](https://yarnpkg.com/en/), use the following command instead:
|
|
23
22
|
|
|
24
23
|
```bash
|
|
25
24
|
yarn add @carbon/charts @carbon/charts-react d3
|
|
26
25
|
```
|
|
27
26
|
|
|
28
|
-
**Note:** you'd also need to install `carbon-components` if you're not using a
|
|
29
|
-
|
|
27
|
+
**Note:** you'd also need to install `carbon-components` if you're not using a bundled version of
|
|
28
|
+
the library.
|
|
30
29
|
|
|
31
30
|
## Step-by-step instructions
|
|
32
31
|
|
|
@@ -37,23 +36,22 @@ Read
|
|
|
37
36
|
|
|
38
37
|
[Sample use cases can be seen here](https://carbon-design-system.github.io/carbon-charts/react).
|
|
39
38
|
|
|
40
|
-
**When opening the link above**, click on the **Edit on Codesandbox** button for
|
|
41
|
-
|
|
39
|
+
**When opening the link above**, click on the **Edit on Codesandbox** button for each demo to see an
|
|
40
|
+
isolated project showing you how to reproduce the demo.
|
|
42
41
|
|
|
43
42
|
## Charting data & options
|
|
44
43
|
|
|
45
|
-
Although we will definitely introduce new models in the future as we start
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
Although we will definitely introduce new models in the future as we start shipping new components
|
|
45
|
+
such as maps, Data and options follow the same model in all charts, with minor exceptions and
|
|
46
|
+
differences in specific components.
|
|
48
47
|
|
|
49
|
-
For instance in the case of a donut chart you're able to pass in an additional
|
|
50
|
-
|
|
48
|
+
For instance in the case of a donut chart you're able to pass in an additional field called `center`
|
|
49
|
+
in your options configuring the donut center.
|
|
51
50
|
|
|
52
51
|
For instructions on using the **tabular data format**, see
|
|
53
52
|
[here](https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format)
|
|
54
53
|
|
|
55
|
-
There are also additional options available depending on the chart type being
|
|
56
|
-
used,
|
|
54
|
+
There are also additional options available depending on the chart type being used,
|
|
57
55
|
[see our demo examples here](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/core/demo/data).
|
|
58
56
|
|
|
59
57
|
Customizable options (specific to chart type) can be found
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AlluvialChart as AlluvialChartCore, type AlluvialChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class AlluvialChart extends BaseChart<AlluvialChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: AlluvialChartOptions): AlluvialChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AreaChart as AreaChartCore, type AreaChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class AreaChart extends BaseChart<AreaChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: AreaChartOptions): AreaChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Chart as BaseChartCore, BaseChartOptions, ChartTabularData } from '@carbon/charts';
|
|
3
|
+
interface Props<Options extends BaseChartOptions> {
|
|
4
|
+
options: Options;
|
|
5
|
+
data: ChartTabularData;
|
|
6
|
+
}
|
|
7
|
+
export default class BaseChart<Options extends BaseChartOptions = BaseChartOptions> extends React.PureComponent<Props<Options>, unknown> {
|
|
8
|
+
chart?: BaseChartCore;
|
|
9
|
+
chartRef: React.RefObject<HTMLDivElement>;
|
|
10
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: Options): BaseChartCore;
|
|
11
|
+
componentDidUpdate(prevProps: Props<Options>): void;
|
|
12
|
+
componentWillUnmount(): void;
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BoxplotChart as BoxplotChartCore, type BoxplotChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class BoxplotChart extends BaseChart<BoxplotChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: BoxplotChartOptions): BoxplotChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BubbleChart as BubbleChartCore, type BubbleChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class BubbleChart extends BaseChart<BubbleChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: BubbleChartOptions): BubbleChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BulletChart as BulletChartCore, type BulletChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class BulletChart extends BaseChart<BulletChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: BulletChartOptions): BulletChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ExperimentalChoroplethChart as ChoroplethChartCore, type ChoroplethChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class ExperimentalChoroplethChart extends BaseChart<ChoroplethChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: ChoroplethChartOptions): ChoroplethChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CirclePackChart as CirclePackChartCore, type CirclePackChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class CirclePackChart extends BaseChart<CirclePackChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: CirclePackChartOptions): CirclePackChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComboChart as ComboChartCore, type ComboChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class ComboChart extends BaseChart<ComboChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: ComboChartOptions): ComboChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DonutChart as DonutChartCore, type DonutChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class DonutChart extends BaseChart<DonutChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: DonutChartOptions): DonutChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GaugeChart as GaugeChartCore, type GaugeChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class GaugeChart extends BaseChart<GaugeChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: GaugeChartOptions): GaugeChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GroupedBarChart as GroupedBarChartCore, type BarChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class GroupedBarChart extends BaseChart<BarChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: BarChartOptions): GroupedBarChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HeatmapChart as HeatmapChartCore, type HeatmapChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class HeatmapChart extends BaseChart<HeatmapChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: HeatmapChartOptions): HeatmapChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HistogramChart as HistogramChartCore, type HistogramChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class HistogramChart extends BaseChart<HistogramChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: HistogramChartOptions): HistogramChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LineChart as LineChartCore, type LineChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class LineChart extends BaseChart<LineChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: LineChartOptions): LineChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LollipopChart as LollipopChartCore, type LollipopChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class LollipopChart extends BaseChart<LollipopChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: LollipopChartOptions): LollipopChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MeterChart as MeterChartCore, type MeterChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class MeterChart extends BaseChart<MeterChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: MeterChartOptions): MeterChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PieChart as PieChartCore, type PieChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class PieChart extends BaseChart<PieChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: PieChartOptions): PieChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RadarChart as RadarChartCore, type RadarChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class RadarChart extends BaseChart<RadarChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: RadarChartOptions): RadarChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ScatterChart as ScatterChartCore, type ScatterChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class ScatterChart extends BaseChart<ScatterChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: ScatterChartOptions): ScatterChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SimpleBarChart as SimpleBarChartCore, type BarChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class SimpleBarChart extends BaseChart<BarChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: BarChartOptions): SimpleBarChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StackedAreaChart as StackedAreaChartCore, type StackedAreaChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class StackedAreaChart extends BaseChart<StackedAreaChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: StackedAreaChartOptions): StackedAreaChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StackedBarChart as StackedBarChartCore, type StackedBarChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class StackedBarChart extends BaseChart<StackedBarChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: StackedBarChartOptions): StackedBarChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TreeChart as TreeChartCore, type TreeChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class TreeChart extends BaseChart<TreeChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: TreeChartOptions): TreeChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TreemapChart as TreemapChartCore, type TreemapChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class TreemapChart extends BaseChart<TreemapChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: TreemapChartOptions): TreemapChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { WordCloudChart as WordCloudChartCore, type WorldCloudChartOptions, type ChartTabularData } from '@carbon/charts';
|
|
2
|
+
import BaseChart from './BaseChart';
|
|
3
|
+
export default class WordCloudChart extends BaseChart<WorldCloudChartOptions> {
|
|
4
|
+
createChart(chartRef: HTMLDivElement, data: ChartTabularData, options: WorldCloudChartOptions): WordCloudChartCore;
|
|
5
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import AlluvialChart from './AlluvialChart';
|
|
2
|
+
import AreaChart from './AreaChart';
|
|
3
|
+
import BoxplotChart from './BoxplotChart';
|
|
4
|
+
import BubbleChart from './BubbleChart';
|
|
5
|
+
import BulletChart from './BulletChart';
|
|
6
|
+
import ExperimentalChoroplethChart from './ChoroplethChart';
|
|
7
|
+
import CirclePackChart from './CirclePackChart';
|
|
8
|
+
import ComboChart from './ComboChart';
|
|
9
|
+
import DonutChart from './DonutChart';
|
|
10
|
+
import GaugeChart from './GaugeChart';
|
|
11
|
+
import GroupedBarChart from './GroupedBarChart';
|
|
12
|
+
import HeatmapChart from './HeatmapChart';
|
|
13
|
+
import HistogramChart from './HistogramChart';
|
|
14
|
+
import LineChart from './LineChart';
|
|
15
|
+
import LollipopChart from './LollipopChart';
|
|
16
|
+
import MeterChart from './MeterChart';
|
|
17
|
+
import PieChart from './PieChart';
|
|
18
|
+
import RadarChart from './RadarChart';
|
|
19
|
+
import ScatterChart from './ScatterChart';
|
|
20
|
+
import SimpleBarChart from './SimpleBarChart';
|
|
21
|
+
import StackedAreaChart from './StackedAreaChart';
|
|
22
|
+
import StackedBarChart from './StackedBarChart';
|
|
23
|
+
import TreeChart from './TreeChart';
|
|
24
|
+
import TreemapChart from './TreemapChart';
|
|
25
|
+
import WordCloudChart from './WordCloudChart';
|
|
26
|
+
export { AlluvialChart, AreaChart, BoxplotChart, BubbleChart, BulletChart, ExperimentalChoroplethChart, CirclePackChart, ComboChart, DonutChart, GaugeChart, GroupedBarChart, HeatmapChart, HistogramChart, LineChart, LollipopChart, MeterChart, PieChart, RadarChart, ScatterChart, SimpleBarChart, StackedAreaChart, StackedBarChart, TreeChart, TreemapChart, WordCloudChart };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CssPosition = 'fixed' | 'absolute' | 'relative' | 'static' | 'sticky';
|
|
3
|
+
type CardNodeProps = {
|
|
4
|
+
tag?: 'div' | 'a' | 'button';
|
|
5
|
+
href?: string;
|
|
6
|
+
stacked?: boolean;
|
|
7
|
+
color?: string;
|
|
8
|
+
position?: CssPosition;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare const CardNode: React.FC<CardNodeProps & React.HTMLAttributes<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>>;
|
|
12
|
+
export { CardNode };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Coordinates = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
type EdgeProps = {
|
|
7
|
+
color?: string;
|
|
8
|
+
markerStart?: string;
|
|
9
|
+
markerEnd?: string;
|
|
10
|
+
source?: Coordinates;
|
|
11
|
+
target?: Coordinates;
|
|
12
|
+
path?: string;
|
|
13
|
+
variant?: string;
|
|
14
|
+
};
|
|
15
|
+
type EdgeSVGProps = Omit<React.SVGProps<SVGGElement>, 'target'>;
|
|
16
|
+
declare const Edge: React.FC<EdgeProps & EdgeSVGProps>;
|
|
17
|
+
export default Edge;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { SVGProps } from 'react';
|
|
2
|
+
interface MarkerProps extends SVGProps<SVGMarkerElement> {
|
|
3
|
+
id?: string;
|
|
4
|
+
d?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
position?: 'start' | 'end';
|
|
7
|
+
orient?: string | number;
|
|
8
|
+
height?: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
refX?: number;
|
|
11
|
+
refY?: number;
|
|
12
|
+
}
|
|
13
|
+
declare const Marker: React.FC<MarkerProps>;
|
|
14
|
+
declare const ArrowLeftMarker: React.FC<Omit<MarkerProps, 'd'>>;
|
|
15
|
+
declare const ArrowRightMarker: React.FC<Omit<MarkerProps, 'd'>>;
|
|
16
|
+
declare const CircleMarker: React.FC<Omit<MarkerProps, 'd'>>;
|
|
17
|
+
declare const DiamondMarker: React.FC<Omit<MarkerProps, 'd'>>;
|
|
18
|
+
declare const SquareMarker: React.FC<Omit<MarkerProps, 'd'>>;
|
|
19
|
+
declare const TeeMarker: React.FC<Omit<MarkerProps, 'd'>>;
|
|
20
|
+
export { Marker, ArrowLeftMarker, ArrowRightMarker, CircleMarker, DiamondMarker, SquareMarker, TeeMarker };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CssPosition = 'fixed' | 'absolute' | 'relative' | 'static' | 'sticky';
|
|
3
|
+
type ShapeNodeProps = {
|
|
4
|
+
shape?: 'circle' | 'square' | 'rounded-square';
|
|
5
|
+
tag?: 'div' | 'button' | 'a';
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
renderIcon: React.ReactNode;
|
|
10
|
+
href?: string;
|
|
11
|
+
size?: string | number;
|
|
12
|
+
position?: CssPosition;
|
|
13
|
+
bodyPosition?: CssPosition;
|
|
14
|
+
stacked?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare const ShapeNode: React.FC<ShapeNodeProps & React.HTMLAttributes<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>>;
|
|
17
|
+
export default ShapeNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CardNode } from './CardNode';
|
|
2
|
+
import { CardNodeColumn } from './CardNodeColumn';
|
|
3
|
+
import { CardNodeLabel } from './CardNodeLabel';
|
|
4
|
+
import { CardNodeSubtitle } from './CardNodeSubtitle';
|
|
5
|
+
import { CardNodeTitle } from './CardNodeTitle';
|
|
6
|
+
import Edge from './Edge';
|
|
7
|
+
import { ArrowLeftMarker, ArrowRightMarker, CircleMarker, DiamondMarker, Marker, SquareMarker, TeeMarker } from './Marker';
|
|
8
|
+
import ShapeNode from './ShapeNode';
|
|
9
|
+
export { CardNode, CardNodeColumn, CardNodeSubtitle, CardNodeTitle, CardNodeLabel, Edge, ArrowLeftMarker, ArrowRightMarker, CircleMarker, DiamondMarker, Marker, SquareMarker, TeeMarker, ShapeNode };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { AreaChart, StackedAreaChart, GroupedBarChart, SimpleBarChart, StackedBarChart, BoxplotChart, BubbleChart, BulletChart, ExperimentalChoroplethChart, DonutChart, GaugeChart, HistogramChart, LineChart, LollipopChart, PieChart, ScatterChart, MeterChart, RadarChart, ComboChart, TreeChart, TreemapChart, CirclePackChart, WordCloudChart, AlluvialChart, HeatmapChart } from './charts';
|
|
2
|
+
export { ArrowLeftMarker, ArrowRightMarker, CardNode, CardNodeColumn, CardNodeSubtitle, CardNodeTitle, CardNodeLabel, CircleMarker, DiamondMarker, Edge, Marker, ShapeNode, SquareMarker, TeeMarker } from './diagrams';
|