-
-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在图表上左右滑动会出现数据错乱的问题 #222
Comments
Hey @huangche007 |
@apertureless I mean, when the left and right slides, the data of the X axis and the Y axis will be deranged |
Hm, can you post some reproduction? (jsfiddle, codepen, minimal repository) It never happend for me tho. |
you can access to http://m.ciyigou.com/mobile/#/pricedetail/10230,when you switch to March,and move right and left,the data of the X axis and the Y axis will be deranged |
How your tabs are working? With Are you using the current version? |
some code as follow:
|
Okay, I understand. And then after |
i just re-rendering the chart |
How can i re-create the whole chart-component? |
@apertureless Thank you very much,I solved this problem like this: import {Line} from 'vue-chartjs'
export default {
extends: Line,
props: ['chartData', 'options'],
mounted () {
this.renderChart(this.chartData, this.options)
},
watch: {
options () {
this._chart.destroy();
this.renderChart(this.chartData, this.options);
},
chartData () {
this._chart.destroy();
console.log("或得到的监视数据chartData:",this.chartData);
this.renderChart(this.chartData, this.options);
}
}
} this._chart.destroy(); //this code is every important |
这里有一个tab,当我从一月切换到三月,然后左右滑动的时候,发现三月显示的数据会出现错乱(会显示一月的时候)
我录制了一份gif图,大佬们可以看看.
效果图
The text was updated successfully, but these errors were encountered: