mirror of
https://github.com/bendtherules/react-vis-gridarea.git
synced 2026-08-18 13:51:59 +00:00
Reverse props direction meaning
This commit is contained in:
+2
-1
@@ -77,7 +77,8 @@ class GridArea extends PureComponent<GridAreaProps, {}> {
|
||||
|
||||
const style = {...GridArea.defaultStyle, ...this.props.style};
|
||||
|
||||
const isVertical = (this.props.direction === Direction.VERTICAL);
|
||||
const axisDirection = (this.props.direction === Direction.VERTICAL ? Direction.HORIZONTAL : Direction.VERTICAL);
|
||||
const isVertical = (axisDirection === Direction.VERTICAL);
|
||||
|
||||
const primaryAxisName = isVertical ? 'y' : 'x';
|
||||
const crossAxisName = isVertical ? 'x' : 'y';
|
||||
|
||||
@@ -24,7 +24,7 @@ export default class BasicChartWithGridArea extends React.Component {
|
||||
<HorizontalGridLines />
|
||||
<VerticalGridLines />
|
||||
<GridArea
|
||||
direction={'vertical'}
|
||||
direction={'horizontal'}
|
||||
style={{fill:"rgba(0,255,0,0.4)"}}
|
||||
highlightRegion={[[4, 5.76], [8.5, 11.25]]}
|
||||
/>
|
||||
|
||||
@@ -24,7 +24,7 @@ export default class BasicChartWithGridArea extends React.Component {
|
||||
<HorizontalGridLines />
|
||||
<VerticalGridLines />
|
||||
<GridArea
|
||||
direction={'horizontal'}
|
||||
direction={'vertical'}
|
||||
style={{fill:"rgba(0,255,0,0.4)"}}
|
||||
highlightRegion={[[timestamp + MSEC_DAILY*2, timestamp + MSEC_DAILY*3]]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user