Skip to content

Commit

Permalink
Merge pull request #1576 from tradingview/allow-primitives-to-draw-ab…
Browse files Browse the repository at this point in the history
…ove-price-animation

Allow primitives to draw above the last price animation
  • Loading branch information
SlicedSilver authored May 8, 2024
2 parents 9a36af0 + cc8f3d0 commit 70827f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LineStyle, createChart } from 'lightweight-charts';
import { LastPriceAnimationMode, LineStyle, createChart } from 'lightweight-charts';
import { generateLineData } from '../../../sample-data';
import { UserAlertInfo } from '../state';
import { UserPriceAlerts } from '../user-price-alerts';
Expand Down Expand Up @@ -41,6 +41,7 @@ const areaSeries = chart.addAreaSeries({
topColor: 'rgba(4,153,129, 0.4)',
bottomColor: 'rgba(4,153,129, 0)',
priceLineVisible: false,
lastPriceAnimation: LastPriceAnimationMode.Continuous,
});
const data = generateLineData();
areaSeries.setData(data);
Expand Down
2 changes: 1 addition & 1 deletion src/model/series.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export class Series<T extends SeriesType> extends PriceDataSource implements IDe
}

animationPaneView.invalidateStage();
res.push(animationPaneView);
res.unshift(animationPaneView);
return res;
}

Expand Down

0 comments on commit 70827f7

Please sign in to comment.