Adding html button to panes #1858
-
|
Hi , Is there any way to add html button to panes, I also want to know when panes are resized , is there any callbacks ? I cannot see anything in documentation , Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
|
Yes, you can add HTML buttons to panes in Lightweight Charts by manipulating the DOM directly:
For detecting pane resizes, Lightweight Charts doesn't provide direct callbacks for individual pane resizing. However, you can:
|
Beta Was this translation helpful? Give feedback.
-
|
Uploading Screen Recording 2025-04-09 at 21.23.00.mov… Hi , i am adding a buttons to each created pane , but I think its swapping the series instead of removing the actual pane , is that the correct behaviour ,, how does pane work @SlicedSilver Actually I want to set the indicator names , but when i remove it , the deleted indicator name is still shown , what is the correct approach to solve this. p.s : i cannot upload video in discussion ? |
Beta Was this translation helpful? Give feedback.
-
|
Hi , i can create plugin , please let me know if its possible with plugins 1.can i use HTML buttons with hover etc and events inside canvas |
Beta Was this translation helpful? Give feedback.
-
|
Yea hover,hit effects etc seems complex, I think i will stick to updating dom elements.Any tips on html dom I should consider before implementing it ? |
Beta Was this translation helpful? Give feedback.
Yes, you can add HTML buttons to panes in Lightweight Charts by manipulating the DOM directly:
Each pane is rendered as a table row (
<tr>) within a table inside the container div. You can append custom HTML elements to these rows using standard DOM APIs.For proper positioning:
position: absoluteandz-index: 100(some number large enough to stack on top) on your button elementsposition: relativeon the parent<tr>elements to establish positioning contextFor detecting pane resizes, Lightweight Charts doesn't provide direct callbacks for individual pane resizing. However, you can: