Set priceFormat precision 0 for chart series to display integer prices
This commit is contained in:
@ -324,15 +324,16 @@ constructor() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.candleSeries = this.chart.addSeries(LightweightCharts.CandlestickSeries, {
|
this.candleSeries = this.chart.addSeries(LightweightCharts.CandlestickSeries, {
|
||||||
upColor: '#ff9800',
|
upColor: '#ff9800',
|
||||||
downColor: '#ff9800',
|
downColor: '#ff9800',
|
||||||
borderUpColor: '#ff9800',
|
borderUpColor: '#ff9800',
|
||||||
borderDownColor: '#ff9800',
|
borderDownColor: '#ff9800',
|
||||||
wickUpColor: '#ff9800',
|
wickUpColor: '#ff9800',
|
||||||
wickDownColor: '#ff9800',
|
wickDownColor: '#ff9800',
|
||||||
lastValueVisible: false,
|
lastValueVisible: false,
|
||||||
priceLineVisible: false,
|
priceLineVisible: false,
|
||||||
}, 0);
|
priceFormat: { type: 'price', precision: 0, minMove: 1 }
|
||||||
|
}, 0);
|
||||||
|
|
||||||
this.avgPriceSeries = this.chart.addSeries(LightweightCharts.LineSeries, {
|
this.avgPriceSeries = this.chart.addSeries(LightweightCharts.LineSeries, {
|
||||||
color: '#00bcd4',
|
color: '#00bcd4',
|
||||||
@ -340,9 +341,10 @@ constructor() {
|
|||||||
lineStyle: LightweightCharts.LineStyle.Solid,
|
lineStyle: LightweightCharts.LineStyle.Solid,
|
||||||
lastValueVisible: true,
|
lastValueVisible: true,
|
||||||
priceLineVisible: false,
|
priceLineVisible: false,
|
||||||
crosshairMarkerVisible: false,
|
crosshairMarkerVisible: false,
|
||||||
title: '',
|
title: '',
|
||||||
});
|
priceFormat: { type: 'price', precision: 0, minMove: 1 }
|
||||||
|
});
|
||||||
|
|
||||||
this.currentPriceLine = this.candleSeries.createPriceLine({
|
this.currentPriceLine = this.candleSeries.createPriceLine({
|
||||||
price: 0,
|
price: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user