I don't think it's necessarily important to move away from the switch/case.  It's a question of readability more than anything.  Code must always be done correctly in order to work properly and there are cases where switch/case is just more readable than a long chain of if/else.  There are also cases where it doesn't work.

At a minimum, however, I would say that if you have a switch/case, you always need a default.  In this case, that default should probably just be

``` javascript
default:
  throw new Error("Unknown chart type: " + this.chart.type);
```