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

chore: 修复控制台 warning #2472

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 18 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,23 @@
},
"tsdocMetadata": {
"enabled": false
},
"messages": {
"extractorMessageReporting": {
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-forgotten-export": {
"logLevel": "none"
}
},
"tsdocMessageReporting": {
"tsdoc-param-tag-missing-hyphen": {
"logLevel": "none"
},
"tsdoc-escape-greater-than": {
"logLevel": "none"
}
}
}
}
18 changes: 12 additions & 6 deletions src/adaptor/geometries/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
export { area, AreaGeometryOptions } from './area';
export { line, LineGeometryOptions } from './line';
export { point, PointGeometryOptions } from './point';
export { interval, IntervalGeometryOptions } from './interval';
export { polygon, PolygonGeometryOptions } from './polygon';
export { edge, EdgeGeometryOptions } from './edge';
export { area } from './area';
export type { AreaGeometryOptions } from './area';
export { line } from './line';
export type { LineGeometryOptions } from './line';
export { point } from './point';
export type { PointGeometryOptions } from './point';
export { interval } from './interval';
export type { IntervalGeometryOptions } from './interval';
export { polygon } from './polygon';
export type { PolygonGeometryOptions } from './polygon';
export { edge } from './edge';
export type { EdgeGeometryOptions } from './edge';
95 changes: 63 additions & 32 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,107 +8,138 @@ export { G2 };
export { Plot } from './core/plot';

/** Adaptor 及其参数的类型定义 */
export { Adaptor, Params } from './core/adaptor';
export type { Adaptor, Params } from './core/adaptor';

// 类型定义导出
export * from './types';

// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)
export { Line, LineOptions } from './plots/line';
export { Line } from './plots/line';
export type { LineOptions } from './plots/line';

// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)
export { Area, AreaOptions } from './plots/area';
export { Area } from './plots/area';
export type { AreaOptions } from './plots/area';

// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)
export { Column, ColumnOptions } from './plots/column';
export { Column } from './plots/column';
export type { ColumnOptions } from './plots/column';

// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)
export { Bar, BarOptions } from './plots/bar';
export { Bar } from './plots/bar';
export type { BarOptions } from './plots/bar';

// 饼图及类型定义 | author by [visiky](https://github.com/visiky)
export { Pie, PieOptions } from './plots/pie';
export { Pie } from './plots/pie';
export type { PieOptions } from './plots/pie';

// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
export { Rose, RoseOptions } from './plots/rose';
export { Rose } from './plots/rose';
export type { RoseOptions } from './plots/rose';

// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
export { WordCloud, WordCloudOptions } from './plots/word-cloud';
export { WordCloud } from './plots/word-cloud';
export type { WordCloudOptions } from './plots/word-cloud';

// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)
export { Scatter, ScatterOptions } from './plots/scatter';
export { Scatter } from './plots/scatter';
export type { ScatterOptions } from './plots/scatter';

// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)
export { Radar, RadarOptions } from './plots/radar';
export { Radar } from './plots/radar';
export type { RadarOptions } from './plots/radar';

// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)
export { DualAxes, DualAxesOptions } from './plots/dual-axes';
export { DualAxes } from './plots/dual-axes';
export type { DualAxesOptions } from './plots/dual-axes';

// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)
export { TinyLine, TinyLineOptions } from './plots/tiny-line';
export { TinyLine } from './plots/tiny-line';
export type { TinyLineOptions } from './plots/tiny-line';

// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)
export { TinyColumn, TinyColumnOptions } from './plots/tiny-column';
export { TinyColumn } from './plots/tiny-column';
export type { TinyColumnOptions } from './plots/tiny-column';

// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)
export { TinyArea, TinyAreaOptions } from './plots/tiny-area';
export { TinyArea } from './plots/tiny-area';
export type { TinyAreaOptions } from './plots/tiny-area';

// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
export { Histogram, HistogramOptions } from './plots/histogram';
export { Histogram } from './plots/histogram';
export type { HistogramOptions } from './plots/histogram';

// 进度图及类型定义 | author by [connono](https://github.com/connono)
export { Progress, ProgressOptions } from './plots/progress';
export { Progress } from './plots/progress';
export type { ProgressOptions } from './plots/progress';

// 环形进度图及类型定义 | author by [connono](https://github.com/connono)
export { RingProgress, RingProgressOptions } from './plots/ring-progress';
export { RingProgress } from './plots/ring-progress';
export type { RingProgressOptions } from './plots/ring-progress';

// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)
export { Heatmap, HeatmapOptions } from './plots/heatmap';
export { Heatmap } from './plots/heatmap';
export type { HeatmapOptions } from './plots/heatmap';

// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)
export { Box, BoxOptions } from './plots/box';
export { Box } from './plots/box';
export type { BoxOptions } from './plots/box';

// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong)
export { Stock, StockOptions } from './plots/stock';
export { Stock } from './plots/stock';
export type { StockOptions } from './plots/stock';

// 漏斗图及类型定义
export { Funnel, FunnelOptions, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';
export { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';
export type { FunnelOptions } from './plots/funnel';

// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc)
export { Liquid, LiquidOptions } from './plots/liquid';
export { Liquid } from './plots/liquid';
export type { LiquidOptions } from './plots/liquid';

// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
export { Bullet, BulletOptions } from './plots/bullet';
export { Bullet } from './plots/bullet';
export type { BulletOptions } from './plots/bullet';

// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1)
export { Sunburst, SunburstOptions } from './plots/sunburst';
export { Sunburst } from './plots/sunburst';
export type { SunburstOptions } from './plots/sunburst';

// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)
export { Gauge, GaugeOptions } from './plots/gauge';
export { Gauge } from './plots/gauge';
export type { GaugeOptions } from './plots/gauge';

// 瀑布图 | author by [visiky](https://github.com/visiky)
export { Waterfall, WaterfallOptions } from './plots/waterfall';
export { Waterfall } from './plots/waterfall';
export type { WaterfallOptions } from './plots/waterfall';

// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)
export { RadialBar, RadialBarOptions } from './plots/radial-bar';
export { RadialBar } from './plots/radial-bar';
export type { RadialBarOptions } from './plots/radial-bar';

// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
export { BidirectionalBar, BidirectionalBarOptions } from './plots/bidirectional-bar';
export { BidirectionalBar } from './plots/bidirectional-bar';
export type { BidirectionalBarOptions } from './plots/bidirectional-bar';

// 矩形树图
export { Treemap, TreemapOptions } from './plots/treemap';
export { Treemap } from './plots/treemap';
export type { TreemapOptions } from './plots/treemap';

// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)
export { Sankey, SankeyOptions } from './plots/sankey';
export { Sankey } from './plots/sankey';
export type { SankeyOptions } from './plots/sankey';

// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu)
export { Chord, ChordOptions } from './plots/chord';
export { Chord } from './plots/chord';
export type { ChordOptions } from './plots/chord';

// 以下开放自定义图表开发的能力(目前仅仅是孵化中)
/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */
export { P } from './plugin';

/** 开放多图层图表 (multi-view) */
export { MultiView, MultiViewOptions } from './plots/multi-view';
export { MultiView } from './plots/multi-view';
export type { MultiViewOptions } from './plots/multi-view';

/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */
export { flow, measureTextWidth } from './utils';
Expand Down
2 changes: 1 addition & 1 deletion src/plots/_template/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Adaptor } from '../../core/adaptor';
import { TemplateOptions } from './types';
import { adaptor } from './adaptor';

export { TemplateOptions };
export type { TemplateOptions };

/**
* 这个是一个图表开发的 模板代码!
Expand Down
4 changes: 2 additions & 2 deletions src/plots/area/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { AreaOptions } from './types';
import { adaptor, meta } from './adaptor';
import { DEFAULT_OPTIONS } from './constants';

export { AreaOptions };
export type { AreaOptions };

export class Area extends Plot<AreaOptions> {
/**
* 获取 面积图 默认配置项
* @static 供外部使用
* 供外部使用
*/
static getDefaultOptions(): Partial<AreaOptions> {
return DEFAULT_OPTIONS;
Expand Down
4 changes: 2 additions & 2 deletions src/plots/bar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { adaptor, meta } from './adaptor';
import { DEFAULT_OPTIONS } from './constants';
import { transformBarData } from './utils';

export { BarOptions };
export type { BarOptions };

/**
* 条形图
*/
export class Bar extends Plot<BarOptions> {
/**
* 获取 条形图 默认配置项
* @static 供外部使用
* 供外部使用
*/
static getDefaultOptions(): Partial<BarOptions> {
return DEFAULT_OPTIONS;
Expand Down
2 changes: 1 addition & 1 deletion src/plots/bidirectional-bar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { adaptor } from './adaptor';
import { syncViewPadding, transformData, isHorizontal } from './utils';
import { SERIES_FIELD_KEY, FIRST_AXES_VIEW, SECOND_AXES_VIEW } from './constant';

export { BidirectionalBarOptions };
export type { BidirectionalBarOptions };

export class BidirectionalBar extends Plot<BidirectionalBarOptions> {
/** 图表类型 */
Expand Down
2 changes: 1 addition & 1 deletion src/plots/box/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BoxOptions } from './types';
import { adaptor } from './adaptor';
import { transformData } from './utils';
import { BOX_RANGE, BOX_RANGE_ALIAS, OUTLIERS_VIEW_ID } from './constant';
export { BoxOptions };
export type { BoxOptions };

export class Box extends Plot<BoxOptions> {
/** 图表类型 */
Expand Down
2 changes: 1 addition & 1 deletion src/plots/bullet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BulletOptions } from './types';
import { adaptor, meta } from './adaptor';
import { transformData } from './utils';

export { BulletOptions };
export type { BulletOptions };

export class Bullet extends Plot<BulletOptions> {
/** 图表类型 */
Expand Down
2 changes: 1 addition & 1 deletion src/plots/chord/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Datum } from '../../types';
import { ChordOptions } from './types';
import { adaptor } from './adaptor';

export { ChordOptions };
export type { ChordOptions };

/**
* 弦图 Chord
Expand Down
4 changes: 2 additions & 2 deletions src/plots/column/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { ColumnOptions } from './types';
import { adaptor, meta } from './adaptor';
import { DEFAULT_OPTIONS } from './constants';

export { ColumnOptions };
export type { ColumnOptions };

/**
* 柱形图
*/
export class Column extends Plot<ColumnOptions> {
/**
* 获取 柱形图 默认配置项
* @static 供外部使用
* 供外部使用
*/
static getDefaultOptions(): Partial<ColumnOptions> {
return DEFAULT_OPTIONS;
Expand Down
2 changes: 1 addition & 1 deletion src/plots/dual-axes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { deepAssign } from '../../utils';
import { DualAxesOptions } from './types';
import { adaptor } from './adaptor';

export { DualAxesOptions };
export type { DualAxesOptions };

export class DualAxes extends Plot<DualAxesOptions> {
/** 图表类型: 双轴图 */
Expand Down
2 changes: 1 addition & 1 deletion src/plots/funnel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FunnelOptions } from './types';
import { adaptor } from './adaptor';
import { FUNNEL_CONVERSATION as FUNNEL_CONVERSATION_FIELD } from './constant';

export { FunnelOptions };
export type { FunnelOptions };

export { FUNNEL_CONVERSATION_FIELD };

Expand Down
4 changes: 2 additions & 2 deletions src/plots/gauge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import { getIndicatorData, getRangeData } from './utils';
import './shapes/gauge';
import './shapes/meter-gauge';

export { GaugeOptions };
export type { GaugeOptions };

/**
* 仪表盘
*/
export class Gauge extends Plot<GaugeOptions> {
/**
* 获取 仪表盘 默认配置项
* @static 供外部使用
* 供外部使用
*/
static getDefaultOptions(): Partial<GaugeOptions> {
return DEFAULT_OPTIONS;
Expand Down
2 changes: 1 addition & 1 deletion src/plots/gauge/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Indicator = {
};
};

type Range = {
export type Range = {
/** 辅助的刻度值 0 ~ 1 的数字 */
readonly ticks?: number[];
/** 辅助刻度的颜色配置 */
Expand Down
2 changes: 1 addition & 1 deletion src/plots/heatmap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { adaptor } from './adaptor';
import './shapes/circle';
import './shapes/square';

export { HeatmapOptions };
export type { HeatmapOptions };

export class Heatmap extends Plot<HeatmapOptions> {
/** 图表类型 */
Expand Down
2 changes: 1 addition & 1 deletion src/plots/histogram/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { binHistogram } from '../../utils/transform/histogram';
import { HistogramOptions } from './types';
import { adaptor } from './adaptor';

export { HistogramOptions };
export type { HistogramOptions };

export class Histogram extends Plot<HistogramOptions> {
/** 图表类型 */
Expand Down
4 changes: 2 additions & 2 deletions src/plots/line/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { adaptor, meta } from './adaptor';
import { DEFAULT_OPTIONS } from './constants';
import './interactions';

export { LineOptions };
export type { LineOptions };

export class Line extends Plot<LineOptions> {
/**
* 获取 折线图 默认配置项
* @static 供外部使用
* 供外部使用
*/
static getDefaultOptions(): Partial<LineOptions> {
return DEFAULT_OPTIONS;
Expand Down
Loading