- Fixed legend not hiding when resizing to 0

- Added the `menu` widget to the topbar.
This commit is contained in:
louisnw
2023-09-06 12:46:52 +01:00
parent 7891c1bc64
commit 8f65a7fc96
4 changed files with 77 additions and 4 deletions

View File

@ -66,6 +66,15 @@ if (!window.Chart) {
this.chart.resize(window.innerWidth * this.scale.width, (window.innerHeight * this.scale.height) - topBarOffset)
this.wrapper.style.width = `${100 * this.scale.width}%`
this.wrapper.style.height = `${100 * this.scale.height}%`
if (this.legend) {
if (this.scale.height === 0 || this.scale.width === 0) {
this.legend.div.style.display = 'none'
}
else {
this.legend.div.style.display = 'flex'
}
}
}
makeCandlestickSeries() {
this.markers = []