diff --git a/plugin-examples/src/plugins/user-price-alerts/example/example.ts b/plugin-examples/src/plugins/user-price-alerts/example/example.ts index 9f0c95a80..ffafc6196 100644 --- a/plugin-examples/src/plugins/user-price-alerts/example/example.ts +++ b/plugin-examples/src/plugins/user-price-alerts/example/example.ts @@ -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'; @@ -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); diff --git a/src/model/series.ts b/src/model/series.ts index 22a235b1e..20dc13c8b 100644 --- a/src/model/series.ts +++ b/src/model/series.ts @@ -411,7 +411,7 @@ export class Series extends PriceDataSource implements IDe } animationPaneView.invalidateStage(); - res.push(animationPaneView); + res.unshift(animationPaneView); return res; }