antvis / antvis/F2

changeSize

Open
#1,139 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

The issue which is not created via https://antv-issue-helper.surge.sh will be closed immediately.

---
mounted() {
const that = this;
window.onresize = () => {
return (() => {
that.screenWidth = window.innerWidth;
})();
};
},
watch里面监听屏幕宽度的变化,然后设置chart的宽度,但是不生效
screenWidth(n, o) {
console.log("screenWidth: ", n, o);
this.$nextTick(() => {
this.chart.changeSize(n);
});
}

Contributor guide

Open the contributing guide

Research direction

Start with the mounted() resize handler and the screenWidth watcher shown in the issue, then trace the chart.changeSize(n) call while reproducing a window resize. Done means the chart visibly updates to the new screen width; the issue provides no repository file or test location to begin from.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.