Skip to content

Commit

Permalink
update lineDots and dotsItem to pass datum to customSymbol function
Browse files Browse the repository at this point in the history
  • Loading branch information
drj17 authored and Raphaël Benitte committed Jan 14, 2019
1 parent aca4579 commit 6ebef54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/components/dots/DotsItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const DotsItem = ({
y,
symbol,
size,
datum,
color,
borderWidth,
borderColor,
Expand All @@ -29,6 +30,7 @@ const DotsItem = ({
{React.createElement(symbol, {
size: size,
color: color,
datum: datum,
borderWidth: borderWidth,
borderColor: borderColor,
})}
Expand All @@ -43,6 +45,7 @@ const DotsItem = ({
DotsItem.propTypes = {
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired,
datum: PropTypes.object.isRequired,

size: PropTypes.number.isRequired,
color: PropTypes.string.isRequired,
Expand Down
3 changes: 3 additions & 0 deletions packages/line/src/LineDots.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const LineDots = ({
key: `${id}.${datum.data.x}`,
x: datum.position.x,
y: datum.position.y,
datum: datum,
fill: color(line),
stroke: borderColor(line),
label: enableLabel ? getLabel(datum.data) : null,
Expand All @@ -61,6 +62,7 @@ const LineDots = ({
key={point.key}
x={point.x}
y={point.y}
datum={point.datum}
symbol={symbol}
size={size}
color={point.fill}
Expand Down Expand Up @@ -100,6 +102,7 @@ const LineDots = ({
key={key}
{...style}
symbol={symbol}
datum={point.datum}
color={point.fill}
borderWidth={borderWidth}
borderColor={point.stroke}
Expand Down

0 comments on commit 6ebef54

Please sign in to comment.