Closed jonluca closed 2 years ago
What's about something like this https://jsfiddle.net/cfn30ovL/ ?
Yes this works great, thanks @timocov!
Do we need to clean up the pricelines individually before we call removeSeries
, or will they be cleaned up automatically?
ie do we need to do
const barSeries = chart.addBarSeries({
thinBars: true,
downColor: '#000',
upColor: '#000',
});
const line = barSeries.createPriceLine({ price: 0, color: 'red', axisLabelVisible: false, lineStyle: LightweightCharts.LineStyle.Solid });
...
barSeries.removePriceLine(line)
chart.removeSeries(barSeries)
or can we just call
chart.removeSeries(barSeries)
and that will clean up the price line as well
Do we need to clean up the pricelines individually before we call removeSeries, or will they be cleaned up automatically?
All lines attached (or created within) to a series will be removed when the series is removed.
and that will clean up the price line as well
Yes, it will work as expected.
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
All x axis grid lines are the same color. It would be nice if we could have the zero line be a different color, and a different width, so it's clear when the values cross the 0 line.
Additional context
N/A