Allow primitives to draw above the last price animation

This commit is contained in:
Mark Silverwood 2024-05-01 15:39:16 +01:00
parent 9a36af0ecc
commit cc8f3d0e11
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -411,7 +411,7 @@ export class Series<T extends SeriesType> extends PriceDataSource implements IDe
}
animationPaneView.invalidateStage();
res.push(animationPaneView);
res.unshift(animationPaneView);
return res;
}