Skip to content

Commit

Permalink
style(chart_state): add comments around series logic
Browse files Browse the repository at this point in the history
  • Loading branch information
emmacunningham committed Mar 1, 2019
1 parent b9d7140 commit f7f8d93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/state/chart_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,12 @@ export class ChartStore {
this.selectedDataSeries = null;
}

// The second argument is optional; if not supplied, then all series will be factored into computations
// Otherwise, selectedDataSeries is used to restrict the computation for just the selected series
const seriesDomains = computeSeriesDomains(this.seriesSpecs, this.selectedDataSeries);
this.seriesDomainsAndData = seriesDomains;

// If this.selectedDataSeries is null, initialize with all split series
// If this.selectedDataSeries is null, initialize with all series
if (!this.selectedDataSeries) {
this.selectedDataSeries = getAllDataSeriesColorValues(seriesDomains.seriesColors);
}
Expand Down

0 comments on commit f7f8d93

Please sign in to comment.