Guest User

Untitled

a guest
May 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. if (chart === 'c1') {
  2. currentChart = this.c1;
  3. } else if (chart === 'c2') {
  4. currentChart = this.c2;
  5. } else if (chart === 'c3') {
  6. currentChart = this.c3;
  7. }
  8. currentChart = data.filter(o => {
  9.  
  10. if (chart === 'c1') {
  11. currentChart = this.c1;
  12. } else if (chart === 'c2') {
  13. currentChart = this.c2;
  14. } else if (chart === 'c3') {
  15. currentChart = this.c3;
  16. }
  17.  
  18. currentChart = this[chart];
  19.  
  20. currentChart = ['c1', 'c2', 'c3'].includes(chart) ? this[chart] : null;
Add Comment
Please, Sign In to add comment