Skip to content

Commit

Permalink
fix: symbolsize修改为width height
Browse files Browse the repository at this point in the history
  • Loading branch information
xuying.xu committed May 28, 2024
1 parent 6a6b226 commit cef3793
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/f2/src/components/pictorial/pictorial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class Pictorial extends withInterval({}) {
<group key={key}>
{children.map((item) => {
const { xMax, xMin, yMax, yMin } = item;
return <Symbol {...item} symbolSize={[xMax - xMin, yMax - yMin]} px2hd={px2hd} />;
return <Symbol {...item} width={xMax - xMin} height={yMax - yMin} px2hd={px2hd} />;
})}
</group>
);
Expand Down
14 changes: 7 additions & 7 deletions packages/f2/test/components/pictorial/basic.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ describe('pictorial', () => {
<Pictorial
x="x"
y="value"
symbol={({ xMin, xMax, yMin, yMax, symbolSize, origin }) => (
symbol={({ xMin, xMax, yMin, yMax, width, height, origin }) => (
<group>
<ellipse
style={{
cx: xMin + symbolSize[0] / 2,
cx: xMin + width / 2,
cy: yMax,
rx: symbolSize[0] / 2,
rx: width / 2,
ry: '20px',
fill: 'l(90) 0:#1f7eff 1:#64adff',
}}
Expand All @@ -93,17 +93,17 @@ describe('pictorial', () => {
style={{
x: xMin,
y: yMin,
width: symbolSize[0],
height: symbolSize[1],
width,
height,
fill: 'l(90) 0:#9cc1ff 1:#ecf5ff',
fillOpacity: 0.9,
}}
/>
<ellipse
style={{
cx: xMin + symbolSize[0] / 2,
cx: xMin + width / 2,
cy: yMin,
rx: symbolSize[0] / 2,
rx: width / 2,
ry: '20px',
fill: 'l(90) 0:#1f7eff 1:#64adff',
}}
Expand Down

0 comments on commit cef3793

Please sign in to comment.