| @@ -58,20 +58,9 @@ | ||
| 58 | 58 | settings.width = self.options.width; |
| 59 | 59 | settings.height = self.options.height; |
| 60 | 60 | |
| 61 | 61 | table = new gv.DataTable({cols: series}); |
| 62 | - | |
| 63 | - switch (type) { | |
| 64 | - case "gauge": | |
| 65 | - case "table": | |
| 66 | - case "timeline": | |
| 67 | - chart = type.charAt(0).toUpperCase() + type.slice(1); | |
| 68 | - break; | |
| 69 | - default: | |
| 70 | - chart = type.charAt(0).toUpperCase() + type.slice(1) + 'Chart'; | |
| 71 | - break; | |
| 72 | - } | |
| 73 | - | |
| 62 | + chart = type === 'gauge' ? 'Gauge' : type.charAt(0).toUpperCase() + type.slice(1) + 'Chart'; | |
| 74 | 63 | chart = new gv[chart](self.el); |
| 75 | 64 | |
| 76 | 65 | switch (type) { |
| 77 | 66 | case 'pie': |