updateDonutGraph () {
    const entryConnections = filter(this.object.incomingConnections, c => c.source.isEntryNode());
    /**
     * Get the start angle of the donut graph based on the totalPercent of the donut to be filled
     *
     * @param {number} totalPercent A percent in decimal form between 0 and 1
     */
    const getStartAngle = (totalPercent) => {
      let startAngle = Math.PI * 0.5;
      if (totalPercent < 1 && entryConnections && entryConnections.length === 1) {
        const incomingNodePosition = entryConnections[0].source.position;
        // start angle is a function of percent and angle of incoming connection
        const x = incomingNodePosition.x - this.object.position.x;
        const y = incomingNodePosition.y - this.object.position.y;
        startAngle = Math.atan2(y, x);
        startAngle += (totalPercent * 2 * Math.PI) / 2;
        startAngle = Math.PI - startAngle;
      }

      return startAngle;
    };

    if (this.loaded) {
      // Remove the old donut segments
      each(this.donutGraphSegments, segment => this.container.remove(segment));
      this.donutGraphSegments.length = 0;

      const donutData = get(this.object, this.detailed.donut.data, undefined);
      const donutIndices = get(this.detailed, ['donut', 'indices'], undefined);
      if (donutIndices) {
        const totalPercent = sum(map(donutIndices, i => donutData[i.key] || 0));
        let startAngle = getStartAngle(totalPercent);
        // add donut slices
        each(donutIndices, (index) => {
          if (donutData[index.key] !== undefined) {
            const colorKey = index.class || index.key;
            startAngle = this.addDonutSlice(startAngle, donutData[index.key], GlobalStyles.getColorTrafficRGBA(colorKey));
          }
        });
      } else {
        const totalPercent = sum(map(donutData));
        let startAngle = getStartAngle(totalPercent);
        // add donut slices
        each(donutData, (classPercent, key) => {
          const colorKey = get(this.detailed, ['donut', 'classes', key], key);
          startAngle = this.addDonutSlice(startAngle, classPercent, GlobalStyles.getColorTrafficRGBA(colorKey));
        });
      }
    }
  }
Update the donut graph if there is updated information to be rendered or if the donut graph
represents a new set of data