Skip to content

Commit

Permalink
fix: label的textAnchor属性更正为textAlign (#2587)
Browse files Browse the repository at this point in the history
Co-authored-by: xiexinrun <xiexinrun@meituan.com>
  • Loading branch information
xinrunxie and xiexinrun committed Jul 9, 2024
1 parent 813b7b3 commit a09a421
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion site/examples/statistics/bar/demo/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const DemoBar = () => {
text: 'frequency',
formatter: '.1%',
style: {
textAnchor: (d) => (+d.frequency > 0.008 ? 'right' : 'start'),
textAlign: (d) => (+d.frequency > 0.008 ? 'right' : 'start'),
fill: (d) => (+d.frequency > 0.008 ? '#fff' : '#000'),
dx: (d) => (+d.frequency > 0.008 ? -5 : 5),
},
Expand Down
4 changes: 2 additions & 2 deletions site/examples/statistics/dual-axes/demo/custom-dual-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const DemoDualAxes = () => {
text: (datum) => `${datum.value}个`,
style: {
dy: -10,
textAnchor: 'middle',
textAlign: 'middle',
},
},
axis: {
Expand All @@ -54,7 +54,7 @@ const DemoDualAxes = () => {
text: (datum) => `${datum.count}个`,
style: {
dy: -10,
textAnchor: 'middle',
textAlign: 'middle',
},
},
axis: {
Expand Down
2 changes: 1 addition & 1 deletion site/examples/statistics/scatter/demo/point-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const DemoScatter = () => {
text: 'name',
style: {
stroke: '#fff',
textAnchor: 'start',
textAlign: 'start',
textBaseline: 'middle',
dx: 10,
position: 'left',
Expand Down

0 comments on commit a09a421

Please sign in to comment.