Skip to content

Commit

Permalink
Merge pull request #1470 from yaniswang/master
Browse files Browse the repository at this point in the history
增加plot双轴图
  • Loading branch information
Leannechn authored Nov 1, 2021
2 parents a9a9afd + e57a81a commit 222dc86
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"dependencies": {
"@antv/component": "*",
"@antv/g2": "4.1.30",
"@antv/g2plot": "2.3.35",
"@antv/g2": "4.1.32",
"@antv/g2plot": "2.3.39",
"@antv/util": "*",
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
Expand Down
16 changes: 16 additions & 0 deletions src/plots/DualAxesChart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'react';
import { DualAxes, DualAxes as Options } from '@antv/g2plot/lib/plots/dual-axes';
import createPlot, { BasePlotOptions } from '../createPlot';
import { LengendAPIOptions, TooltipAPIOptions, LabelAPIOptions } from './core/interface';

interface DualAxesOptions extends Options, BasePlotOptions {
/** 图例 */
legend?: LengendAPIOptions;
/** 图表提示框 */
tooltip?: TooltipAPIOptions;
/** 数据标注label */
label?: LabelAPIOptions;
}
// 直方图
export { DualAxesOptions };
export default createPlot<DualAxesOptions>(DualAxes, 'DualAxesChart');
1 change: 1 addition & 0 deletions src/plots/plots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ export { default as BubbleChart } from './BubbleChart';
export { default as BulletChart } from './BulletChart';
export { default as CalendarChart } from './CalendarChart';
export { default as GaugeChart } from './GaugeChart';
export { default as DualAxesChart } from './DualAxesChart';


0 comments on commit 222dc86

Please sign in to comment.