update method

void update(
  1. [Map options]
)

Updates the chart.

This method should be called after dataTable has been modified.

Implementation

// TODO: handle updates while animation is happening.
void update([Map options]) {
  if (_width == 0 || _height == 0) return;

  if (options != null) {
    _options = mergeMaps(_options, options);
  }

  // This call is redundant for row and column changes but necessary for
  // cell changes.
  _calculateDrawingSizes();
  _updateSeries();
  _axesContext.clearRect(0, 0, _width, _height);
  _drawAxesAndGrid();
  _startAnimation();
}