Replies: 2 comments
-
Pane primitives are essentially the same as Series primitives except that you don't need to attach them to a specific series instance. As such, the zOrder options mentioned here also apply to Pane primitives: https://tradingview.github.io/lightweight-charts/docs/plugins/series-primitives#interactive-demo-of-zorder-layers Essentially you can specify a zOrder relative to the built-in graphics like series, crosshair, labels, etc... To control the order of how multiple Primitives are stacked is determined by the order in which they are added to the chart. If you need to dynamically adjust the ordering then it would require management on your side. One approach would be to have a Primitive which is responsible for drawing multiple items on the chart and it could manage the order via its drawing instructions (canvas code). Or to remove and re-add the primitives in the correct order when the stacking needs to be adjusted. Lightweight Charts is a 'low-level' library which gives you the ability to implement advanced features like this but it isn't included as part of the library. TradingView does offer a far more featured library called Advanced Charts, you can see more information here: So the short answer is that it is possible but it is a lot of code which you would need to implement yourself on top of the Lightweight Charts library. If you are looking to build a fully featured chart like you can see on tradingview.com then we already offer that as a library as well. |
Beta Was this translation helpful? Give feedback.
-
Ok Got it , so where to mention the zorder ? its not in documention. So if i want to change the order of drawings , i want to destroy all and draw on the order I need ? so first one Drawn is zorder 0 right ? What about dragging ? how it works ..please see the video if its possible I don't want to use advanced charts , as its too heavy. also it would be great if example codes attached to demo shown here - https://tradingview.github.io/lightweight-charts/docs/plugins/series-primitives |
Beta Was this translation helpful? Give feedback.
-
First of all Huge thank you for this Milestone , You guys are best.
Now my question is if following things are possible via Pane primitives ,
1.Can we place one primitives above another primitives like z index , if so can we order the drawings dynamically ?
2.can we drag around around created drawings/texts
3.Basically what are the things we cannot do that can be done in oriiginal tradingview drawing tools
Youtube demo
I just want to know if this things are possible and what are the limitations
, As I am starting to implement several drawing tools in my charts..
Beta Was this translation helpful? Give feedback.
All reactions