code: function() {
                              if (scope.chart && scope.svg) {
                                  if (scope.options.chart.type === 'sunburstChart') {
                                      scope.svg.datum(angular.copy(scope.data)).call(scope.chart);
                                  } else {
                                      scope.svg.datum(scope.data).call(scope.chart);
                                  }
                              } else {
                                  scope.api.refresh();
                              }
                          }
docs: Update chart layout (for example if container is resized)