Skip to content

Commit

Permalink
feat: add ts props
Browse files Browse the repository at this point in the history
  • Loading branch information
emileNetter committed Jul 21, 2023
1 parent 6b314c8 commit dd18f87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-d3-plugin/lib/Axis/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import * as d3 from 'd3';
export declare interface AxisObject {
type: d3.Axis<d3.AxisDomain>;
scale: d3.ScaleLinear<number, number, never> |
d3.ScaleTime<number, number, never>;
d3.ScaleTime<number, number, never> |
d3.ScaleBand<string>;
range: d3.ScaleContinuousNumeric<number, number, never> |
d3.ScaleTime<number, number, never>;
data: Array<number | Date>;
Expand Down
3 changes: 3 additions & 0 deletions packages/react-d3-plugin/lib/Axis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Axis.propTypes = {
scale: PropTypes.oneOf([
d3.scaleTime,
d3.scaleLinear,
d3.scaleBand,
]),
range: PropTypes.func,
data: PropTypes.arrayOf(PropTypes.any),
Expand All @@ -137,6 +138,8 @@ Axis.propTypes = {
ticks: PropTypes.number,
tickSize: PropTypes.number,
grid: PropTypes.bool,
bandDomainKey: PropTypes.string,
stackKeys: PropTypes.arrayOf(PropTypes.string),
}).isRequired,
};

Expand Down
3 changes: 3 additions & 0 deletions packages/react-d3-plugin/lib/Chart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ Chart.propTypes = {
scale: PropTypes.oneOf([
d3.scaleTime,
d3.scaleLinear,
d3.scaleBand,
]),
range: PropTypes.func,
data: PropTypes.arrayOf(PropTypes.any),
Expand All @@ -221,6 +222,8 @@ Chart.propTypes = {
ticks: PropTypes.number,
tickSize: PropTypes.number,
grid: PropTypes.bool,
bandDomainKey: PropTypes.string,
stackKeys: PropTypes.arrayOf(PropTypes.string),
})).isRequired,
linearDomainMaxMargin: PropTypes.number,
};
Expand Down

0 comments on commit dd18f87

Please sign in to comment.