This commit is contained in:
David Brazda
2024-11-15 07:00:58 +01:00
parent 6393e618ce
commit 2c656fa640
3 changed files with 11 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
setup( setup(
name='lightweight_charts', name='lightweight_charts',
version='2.2.10', version='2.2.12',
packages=find_packages(), packages=find_packages(),
python_requires='>=3.8', python_requires='>=3.8',
install_requires=[ install_requires=[

View File

@ -37,9 +37,15 @@ export class Legend {
this.div = document.createElement('div'); this.div = document.createElement('div');
this.div.classList.add('legend'); this.div.classList.add('legend');
this.div.style.maxWidth = `${(handler.scale.width * 100) - 8}vw` this.div.style.maxWidth = `${(handler.scale.width * 100) - 8}vw`
this.div.style.maxHeight = '300px'; // Set a maximum height // Important: Set these styles to make it scrollable
this.div.style.overflowY = 'auto'; // Enable vertical scrolling this.div.style.height = '300px'; // Fixed height instead of maxHeight
this.div.style.overflowX = 'hidden'; // Prevent horizontal scrolling this.div.style.overflowY = 'auto';
this.div.style.display = 'block'; // Ensure it's a block element
this.div.style.position = 'relative'; // Helps with positioning
// Optional: Add some styling for better appearance
this.div.style.border = '1px solid #ccc';
this.div.style.padding = '10px';
this.div.style.display = 'none'; this.div.style.display = 'none';
this.text = document.createElement('span') this.text = document.createElement('span')