分面图子视图的边框怎么去掉呢? #5618
Answered
by
pearmini
yuanyongbin
asked this question in
Q&A
分面图子视图的边框怎么去掉呢?
#5618
Replies: 1 comment
-
/**
* A recreation of one of these demos: https://observablehq.com/@observablehq/plot-facets?collection=@observablehq/plot
*/
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
width: 928,
height: 320,
paddingLeft: 60,
paddingBottom: 60,
});
const facetRect = chart
.facetRect()
.data({
type: 'fetch',
value: 'https://assets.antv.antgroup.com/g2/anscombe.json',
})
.encode('x', 'series');
facetRect
.point()
.attr('frame', false) // 这里
.attr('inset', 10)
.encode('x', 'x')
.encode('y', 'y')
.style('stroke', '#000');
chart.render(); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yuanyongbin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
版本:v5.1.5
![image](https://private-user-images.githubusercontent.com/25362141/273439402-5dffb94b-da54-4b06-ad36-886231cc5d6b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwODcxMTMsIm5iZiI6MTcyNTA4NjgxMywicGF0aCI6Ii8yNTM2MjE0MS8yNzM0Mzk0MDItNWRmZmI5NGItZGE1NC00YjA2LWFkMzYtODg2MjMxY2M1ZDZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA2NDY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBmOGQyYTU1YzQ5NGZiNzJjNTVkOTY3YWNjYjBjOGQ5Njg4MWQ4Njk2ODI2YTVhZDlkYTk4ZGQwODk5N2ZiNmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.QiqHYh5gpbiXUuh78VepF403-UYYr-WUjPgTD6PIbrg)
问题:分面图子视图的边框怎么去掉呢?
期望:去掉黑色边框
官网示例: https://g2.antv.antgroup.com/zh/examples/composition/facet#rect-row
截图如下:
Beta Was this translation helpful? Give feedback.
All reactions