Skip to content

Commit

Permalink
fix: correcting types from ChartCanvas
Browse files Browse the repository at this point in the history
The defaultProps was causing d3-array to be brought into types.
  • Loading branch information
markmcdowell committed Sep 10, 2019
1 parent ecfc1ad commit a99551f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/charts/src/ChartCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ export class ChartCanvas extends React.Component<ChartCanvasProps, ChartCanvasSt
type: "hybrid",
pointsPerPxThreshold: 2,
minPointsPerPxThreshold: 1 / 100,
className: "react-stockchart",
className: "react-financial-charts",
zIndex: 1,
xExtents: [min, max],
xExtents: [min, max] as any[],
postCalculator: identity,
padding: 0,
xAccessor: identity,
Expand Down
4 changes: 2 additions & 2 deletions packages/charts/src/coordinates/EdgeCoordinate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ export class EdgeCoordinate extends React.Component<EdgeCoordinateProps> {

coordinateBase = edge.orient === "left" || edge.orient === "right"
? <g transform={`translate(${edge.coordinateBase.edgeXRect},${edge.coordinateBase.edgeYRect})`}>
<path d={path} key={1} className="react-stockchart-text-background"
<path d={path} key={1} className="react-financial-charts-text-background"
height={rectHeight} width={rectWidth}
fill={edge.coordinateBase.fill} opacity={edge.coordinateBase.opacity} />
</g>
: <rect key={1} className="react-stockchart-text-background"
: <rect key={1} className="react-financial-charts-text-background"
x={edge.coordinateBase.edgeXRect}
y={edge.coordinateBase.edgeYRect}
height={rectHeight} width={rectWidth}
Expand Down
4 changes: 2 additions & 2 deletions packages/charts/src/coordinates/EdgeCoordinateV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export function renderSVG(props) {

coordinateBase = edge.orient === "left" || edge.orient === "right"
? <g transform={`translate(${edge.coordinateBase.edgeXRect},${edge.coordinateBase.edgeYRect})`}>
<path d={path} key={1} className="react-stockchart-text-background"
<path d={path} key={1} className="react-financial-charts-text-background"
height={rectHeight} width={rectWidth}
fill={edge.coordinateBase.fill} opacity={edge.coordinateBase.opacity} />
</g>
: <rect key={1} className="react-stockchart-text-background"
: <rect key={1} className="react-financial-charts-text-background"
x={edge.coordinateBase.edgeXRect}
y={edge.coordinateBase.edgeYRect}
height={rectHeight} width={rectWidth}
Expand Down
4 changes: 2 additions & 2 deletions packages/charts/src/coordinates/EdgeCoordinateV3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function renderSVG(props) {
>
<path
d={path}
className="react-stockchart-text-background"
className="react-financial-charts-text-background"
height={rectHeight}
width={rectWidth}
stroke={edge.coordinateBase.stroke}
Expand All @@ -60,7 +60,7 @@ export function renderSVG(props) {
) : (
<rect
key={1}
className="react-stockchart-text-background"
className="react-financial-charts-text-background"
x={edge.coordinateBase.edgeXRect}
y={edge.coordinateBase.edgeYRect}
height={rectHeight}
Expand Down

0 comments on commit a99551f

Please sign in to comment.