Skip to content

Commit

Permalink
Different flag for perf optimzation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ankityadav4 committed Jun 7, 2023
1 parent 972998d commit a41293d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartSt
private _isMultiStackChart: boolean;
private _tooltipId: string;
private _highlightedCircleId: string;
private _enableComputationOptimization: boolean;

public constructor(props: IAreaChartProps) {
super(props);
Expand All @@ -128,6 +129,7 @@ export class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartSt
this._circleId = getId('circle');
this._rectId = getId('rectangle');
this._tooltipId = getId('AreaChartTooltipID');
this._enableComputationOptimization = true;
}

public componentDidUpdate() {
Expand Down Expand Up @@ -363,7 +365,7 @@ export class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartSt
};

private _createDataSet = (points: ILineChartPoints[]) => {
if (this.props.enablePerfOptimization) {
if (this.props.enablePerfOptimization && this._enableComputationOptimization) {
const allChartPoints: ILineChartDataPoint[] = [];
const dataSet: IAreaChartDataSetPoint[] = [];
const colors: string[] = [];
Expand Down

0 comments on commit a41293d

Please sign in to comment.