Refactor table&chart view