-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3581 from VisActor/feat/react-vchart-series
Feat/react vchart series
- Loading branch information
Showing
14 changed files
with
149 additions
and
7 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@visactor/vchart/feat-react-vchart-series_2024-12-19-03-28.json
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,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@visactor/vchart", | ||
"comment": "feat: add miss Series and Chart in react vchart, close #3578", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@visactor/vchart" | ||
} |
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,21 @@ | ||
import type React from 'react'; | ||
import type { IMosaicChartSpec, IVChartConstructor } from '@visactor/vchart'; | ||
import { VChart, registerMosaicChart, registerLabel, registerTotalLabel } from '@visactor/vchart'; | ||
import type { BaseChartProps } from './BaseChart'; | ||
import { createChart } from './BaseChart'; | ||
import { registers } from './registers/cartesian'; | ||
|
||
export interface MosaicChartProps | ||
extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, | ||
Omit<Partial<IMosaicChartSpec>, 'type'> { | ||
// | ||
} | ||
|
||
export const MosaicChart = createChart<React.PropsWithChildren<MosaicChartProps> & { type?: 'mosaic' }>( | ||
'MosaicChart', | ||
{ | ||
type: 'mosaic', | ||
vchartConstrouctor: VChart as IVChartConstructor | ||
}, | ||
[registerMosaicChart, registerLabel, registerTotalLabel, ...registers] | ||
); |
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,19 @@ | ||
import type React from 'react'; | ||
import type { IPictogramChartSpec, IVChartConstructor } from '@visactor/vchart'; | ||
import { VChart, registerPictogramChart, registerLabel } from '@visactor/vchart'; | ||
import { registers } from './registers/simple'; | ||
import type { BaseChartProps } from './BaseChart'; | ||
import { createChart } from './BaseChart'; | ||
|
||
export interface PictogramChartProps | ||
extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, | ||
Omit<Partial<IPictogramChartSpec>, 'type'> {} | ||
|
||
export const PictogramChart = createChart<React.PropsWithChildren<PictogramChartProps> & { type?: 'pictogram' }>( | ||
'PictogramChart', | ||
{ | ||
type: 'pictogram', | ||
vchartConstrouctor: VChart as IVChartConstructor | ||
}, | ||
[registerPictogramChart, registerLabel, ...registers] | ||
); |
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,19 @@ | ||
import type React from 'react'; | ||
import type { IRangeAreaChartSpec, IVChartConstructor } from '@visactor/vchart'; | ||
import { VChart, registerRangeAreaChart, registerLabel } from '@visactor/vchart'; | ||
import { registers } from './registers/cartesian'; | ||
import type { BaseChartProps } from './BaseChart'; | ||
import { createChart } from './BaseChart'; | ||
|
||
export interface RangeAreaChartProps | ||
extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, | ||
Omit<Partial<IRangeAreaChartSpec>, 'type'> {} | ||
|
||
export const RangeAreaChart = createChart<React.PropsWithChildren<RangeAreaChartProps> & { type?: 'rangeArea' }>( | ||
'RangeAreaChart', | ||
{ | ||
type: 'rangeArea', | ||
vchartConstrouctor: VChart as IVChartConstructor | ||
}, | ||
[registerRangeAreaChart, registerLabel, ...registers] | ||
); |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { BaseSeriesProps, createSeries } from './BaseSeries'; | ||
import type { BaseSeriesProps } from './BaseSeries'; | ||
import { createSeries } from './BaseSeries'; | ||
|
||
import type { IGaugeSeriesSpec } from '@visactor/vchart'; | ||
import { registerGaugeSeries } from '@visactor/vchart'; | ||
|
||
export type GaugeProps = BaseSeriesProps & Omit<IGaugeSeriesSpec, 'type'>; | ||
|
||
export const Gauge = createSeries<GaugeProps>('Sankey', ['segment', 'track', 'label'], 'gauge', [registerGaugeSeries]); | ||
export const Gauge = createSeries<GaugeProps>('Gauge', ['segment', 'track', 'label'], 'gauge', [registerGaugeSeries]); |
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,14 @@ | ||
import type { BaseSeriesProps } from './BaseSeries'; | ||
import { createSeries } from './BaseSeries'; | ||
|
||
import type { IGaugePointerSeriesSpec } from '@visactor/vchart'; | ||
import { registerGaugePointerSeries } from '@visactor/vchart'; | ||
|
||
export type GaugePointerProps = BaseSeriesProps & Omit<IGaugePointerSeriesSpec, 'type'>; | ||
|
||
export const GaugePointer = createSeries<GaugePointerProps>( | ||
'GaugePointer', | ||
['pinBackground', 'pin', 'pointer'], | ||
'gaugePointer', | ||
[registerGaugePointerSeries] | ||
); |
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { BaseSeriesProps, createSeries } from './BaseSeries'; | ||
import type { BaseSeriesProps } from './BaseSeries'; | ||
import { createSeries } from './BaseSeries'; | ||
import type { IHeatmapChartSpec } from '@visactor/vchart'; | ||
import { registerHeatmapSeries } from '@visactor/vchart'; | ||
|
||
export type HeatmapProps = BaseSeriesProps & Omit<IHeatmapChartSpec, 'type'>; | ||
|
||
export const Heatmap = createSeries<HeatmapProps>('Treemap', ['cell', 'cellBackground', 'label'], 'heatmap', [ | ||
export const Heatmap = createSeries<HeatmapProps>('Heatmap', ['cell', 'cellBackground', 'label'], 'heatmap', [ | ||
registerHeatmapSeries | ||
]); |
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,8 @@ | ||
import type { BaseSeriesProps } from './BaseSeries'; | ||
import { createSeries } from './BaseSeries'; | ||
import type { IMosaicSeriesSpec } from '@visactor/vchart'; | ||
import { registerMosaicSeries } from '@visactor/vchart'; | ||
|
||
export type MosaicProps = BaseSeriesProps & Omit<IMosaicSeriesSpec, 'type'>; | ||
|
||
export const Mosaic = createSeries<MosaicProps>('Mosaic', ['mosaic'], 'mosaic', [registerMosaicSeries]); |
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,10 @@ | ||
import type { BaseSeriesProps } from './BaseSeries'; | ||
import { createSeries } from './BaseSeries'; | ||
import type { IPictogramSeriesSpec } from '@visactor/vchart'; | ||
import { registerPictogramSeries } from '@visactor/vchart'; | ||
|
||
export type PictogramProps = BaseSeriesProps & Omit<IPictogramSeriesSpec, 'type'>; | ||
|
||
export const Pictogram = createSeries<PictogramProps>('Pictogram', ['pictogram'], 'pictogram', [ | ||
registerPictogramSeries | ||
]); |
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,10 @@ | ||
import type { BaseSeriesProps } from './BaseSeries'; | ||
import { createSeries } from './BaseSeries'; | ||
import type { IRangeAreaSeriesSpec } from '@visactor/vchart'; | ||
import { registerRangeAreaSeries } from '@visactor/vchart'; | ||
|
||
export type RangeAreaProps = BaseSeriesProps & Omit<IRangeAreaSeriesSpec, 'type'>; | ||
|
||
export const RangeArea = createSeries<RangeAreaProps>('RangeArea', ['rangeArea'], 'rangeArea', [ | ||
registerRangeAreaSeries | ||
]); |
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,10 @@ | ||
import type { BaseSeriesProps } from './BaseSeries'; | ||
import { createSeries } from './BaseSeries'; | ||
import type { IVennSeriesSpec } from '@visactor/vchart'; | ||
import { registerVennSeries } from '@visactor/vchart'; | ||
|
||
export type VennProps = BaseSeriesProps & Omit<IVennSeriesSpec, 'type'>; | ||
|
||
export const Venn = createSeries<VennProps>('Venn', ['circle', 'overlap', 'overlapLabel'], 'venn', [ | ||
registerVennSeries | ||
]); |
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