draw method

void draw(
  1. DataTable dataTable,
  2. [Map options]
)

Draws the chart given a data table dataTable and an optional set of options options.

Implementation

void draw(DataTable dataTable, [Map options]) {
  dispose();
  _dataTable = dataTable;
  _dataTableSubscriptionTracker
    ..add(dataTable.onCellChange.listen(_dataCellChanged))
    ..add(dataTable.onColumnsChange.listen(_dataColumnsChanged))
    ..add(dataTable.onRowsChange.listen(_dataRowsChanged));
  _options = mergeMaps(_defaultOptions, options);
  _easingFunction = getEasingFunction(_options['animation']['easing']);
  _initializeLegend();
  _initializeTooltip();
  resize(true);
}