var homeItem = echarts.init(document.getElementById('home-item'))
var profileItem = echarts.init(document.getElementById('profile-item'))
var messagesItem = echarts.init(document.getElementById('messages-item'))
var echartApp = angular.module('echartApp', []);
window.onresize = function (ev) {
$('.item').css({width:$('.tab-content').width()})
homeItem.resize();
profileItem.resize();
messagesItem.resize();
}
/**
* nav切换
* @param type
*/
$scope.onChangeTab=function (type) {
switch (type){
case 'home':{
$('.item').css({width:$('.tab-content').width()})
homeItem = echarts.init(document.getElementById('home-item'));
homeItem.resize();
}break;
case 'profile':{
$('.item').css({width:$('.tab-content').width()})
// profileItem = echarts.init(document.getElementById('profile-item'))
profileItem.resize();
}break;
case 'messages':{
$('.item').css({width:$('.tab-content').width()})
// messagesItem = echarts.init(document.getElementById('messages-item'))
messagesItem.resize();
}break;
case 'settings':{
}break;
}
}
$(window).resize(function(){
$('.item').css({width:$('.tab-content').width()})
homeItem.resize();
profileItem.resize();
messagesItem.resize();
})
$(window).trigger('resize')