victory-errorbar
Advanced tools
Comparing version 34.3.6 to 34.3.7
@@ -80,9 +80,20 @@ import _assign from "lodash/assign"; | ||
var ErrorBar = function (props) { | ||
var evaluateProps = function (props) { | ||
/** | ||
* Potential evaluated props are: | ||
* `id` | ||
* `style` | ||
*/ | ||
var id = Helpers.evaluateProp(props.id, props); | ||
var style = Helpers.evaluateStyle(_assign({ | ||
stroke: "black" | ||
}, props.style), props); | ||
props = _assign({}, props, { | ||
return _assign({}, props, { | ||
id: id, | ||
style: style | ||
}); | ||
}; | ||
var ErrorBar = function (props) { | ||
props = evaluateProps(props); | ||
var error = calculateError(props); | ||
@@ -89,0 +100,0 @@ var children = [error.right ? renderBorder(props, error, "right") : null, error.left ? renderBorder(props, error, "left") : null, error.bottom ? renderBorder(props, error, "bottom") : null, error.top ? renderBorder(props, error, "top") : null, error.right ? renderCross(props, error, "right") : null, error.left ? renderCross(props, error, "left") : null, error.bottom ? renderCross(props, error, "bottom") : null, error.top ? renderCross(props, error, "top") : null].filter(Boolean); |
@@ -8,2 +8,3 @@ import * as React from "react"; | ||
VictoryCommonProps, | ||
VictoryCommonPrimitiveProps, | ||
VictoryLabelableProps, | ||
@@ -30,1 +31,14 @@ VictoryMultiLabelableProps, | ||
export class VictoryErrorBar extends React.Component<VictoryErrorBarProps, any> {} | ||
export interface ErrorBarProps extends VictoryCommonPrimitiveProps { | ||
borderWidth?: number; | ||
datum?: any; | ||
errorX?: number | any[] | boolean; | ||
errorY?: number | any[] | boolean; | ||
groupComponent?: React.ReactElement; | ||
lineComponent?: React.ReactElement; | ||
x?: number; | ||
y?: number; | ||
} | ||
export class ErrorBar extends React.Component<ErrorBarProps, any> {} |
@@ -90,3 +90,10 @@ "use strict"; | ||
var ErrorBar = function (props) { | ||
var evaluateProps = function (props) { | ||
/** | ||
* Potential evaluated props are: | ||
* `id` | ||
* `style` | ||
*/ | ||
var id = _victoryCore.Helpers.evaluateProp(props.id, props); | ||
var style = _victoryCore.Helpers.evaluateStyle((0, _assign2.default)({ | ||
@@ -96,5 +103,10 @@ stroke: "black" | ||
props = (0, _assign2.default)({}, props, { | ||
return (0, _assign2.default)({}, props, { | ||
id: id, | ||
style: style | ||
}); | ||
}; | ||
var ErrorBar = function (props) { | ||
props = evaluateProps(props); | ||
var error = calculateError(props); | ||
@@ -101,0 +113,0 @@ var children = [error.right ? renderBorder(props, error, "right") : null, error.left ? renderBorder(props, error, "left") : null, error.bottom ? renderBorder(props, error, "bottom") : null, error.top ? renderBorder(props, error, "top") : null, error.right ? renderCross(props, error, "right") : null, error.left ? renderCross(props, error, "left") : null, error.bottom ? renderCross(props, error, "bottom") : null, error.top ? renderCross(props, error, "top") : null].filter(Boolean); |
@@ -8,2 +8,3 @@ import * as React from "react"; | ||
VictoryCommonProps, | ||
VictoryCommonPrimitiveProps, | ||
VictoryLabelableProps, | ||
@@ -30,1 +31,14 @@ VictoryMultiLabelableProps, | ||
export class VictoryErrorBar extends React.Component<VictoryErrorBarProps, any> {} | ||
export interface ErrorBarProps extends VictoryCommonPrimitiveProps { | ||
borderWidth?: number; | ||
datum?: any; | ||
errorX?: number | any[] | boolean; | ||
errorY?: number | any[] | boolean; | ||
groupComponent?: React.ReactElement; | ||
lineComponent?: React.ReactElement; | ||
x?: number; | ||
y?: number; | ||
} | ||
export class ErrorBar extends React.Component<ErrorBarProps, any> {} |
{ | ||
"name": "victory-errorbar", | ||
"version": "34.3.6", | ||
"version": "34.3.7", | ||
"description": "Error Bar Component for Victory", | ||
@@ -24,3 +24,3 @@ "keywords": [ | ||
"prop-types": "^15.5.8", | ||
"victory-core": "^34.3.6" | ||
"victory-core": "^34.3.7" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
@@ -62,5 +62,17 @@ /* eslint-disable max-statements */ | ||
const evaluateProps = (props) => { | ||
/** | ||
* Potential evaluated props are: | ||
* `id` | ||
* `style` | ||
*/ | ||
const id = Helpers.evaluateProp(props.id, props); | ||
const style = Helpers.evaluateStyle(assign({ stroke: "black" }, props.style), props); | ||
return assign({}, props, { id, style }); | ||
}; | ||
const ErrorBar = (props) => { | ||
const style = Helpers.evaluateStyle(assign({ stroke: "black" }, props.style), props); | ||
props = assign({}, props, { style }); | ||
props = evaluateProps(props); | ||
const error = calculateError(props); | ||
@@ -67,0 +79,0 @@ const children = [ |
@@ -8,2 +8,3 @@ import * as React from "react"; | ||
VictoryCommonProps, | ||
VictoryCommonPrimitiveProps, | ||
VictoryLabelableProps, | ||
@@ -30,1 +31,14 @@ VictoryMultiLabelableProps, | ||
export class VictoryErrorBar extends React.Component<VictoryErrorBarProps, any> {} | ||
export interface ErrorBarProps extends VictoryCommonPrimitiveProps { | ||
borderWidth?: number; | ||
datum?: any; | ||
errorX?: number | any[] | boolean; | ||
errorY?: number | any[] | boolean; | ||
groupComponent?: React.ReactElement; | ||
lineComponent?: React.ReactElement; | ||
x?: number; | ||
y?: number; | ||
} | ||
export class ErrorBar extends React.Component<ErrorBarProps, any> {} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1311748
8313
Updatedvictory-core@^34.3.7