I just played with it, and noticed that because we set `visualization.name` when creating the visualization object, it means that it won't change when you switch types.

How about this alternative:
```javascript
scope.$watch('visualization.type', function (type, oldType) {
    // if not edited by user, set name to match type
    if (type && oldType != type && scope.visualization && !scope.visForm.name.$dirty) {
        // poor man's titlecase
        scope.visualization.name = scope.visualization.type[0] + scope.visualization.type.slice(1).toLowerCase();
    }
});
```

(notice the comparison of `type` with `oldType`)