Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: fix multi-pane feature #824

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ntf
Copy link

@ntf ntf commented Aug 24, 2021

Type of PR: enhancement

PR checklist:

Overview of change:
This is base on the pane widget and pane separator feature previously implemented in 22c6b03.

Is there anything you'd like reviewers to focus on?
API design. New API added so far (To be finalized)

Things I have implemented so far:

  • series option to configure which pane a series should be rendered ( pane: number to SeriesOptionsCommon )
  • ChartApi#removePane(index: number) so that you can remove a pane (and series on it) programmatically.
  • ChartApi#swapPane(first: number, second: number) for swapping the positions of the two pane.
  • code to handle series.applyOptions( { pane: newIndex } );
  • ChartApi#getPaneElements() for getting container elements to each pane. (I need the container to draw legends to each pane)

Things I am also implementing but not going to be included in this PR:

  • React binding with pane and legend supports

Demo here (It maybe outdated): https://jsfiddle.net/adrianntf/6qea5ytv/2/

You can use below command to install my version to your project locally:

yarn add git+https://github.com/ntf/lightweight-charts.git
or npm install git+https://github.com/ntf/lightweight-charts.git

You should not use this directly in your production environment. However, you may review my code and merge into your own folk of the project.

@ntf ntf mentioned this pull request Aug 24, 2021
@ntf
Copy link
Author

ntf commented Sep 11, 2021

Things I have implemented so far:

  • series option to configure which pane a series should be rendered ( pane: number to SeriesOptionsCommon )
  • ChartApi#removePane(index: number) so that you can remove a pane (and series on it) programmatically.
  • ChartApi#swapPane(first: number, second: number) for swapping the positions of the two pane.
  • code to handle series.applyOptions( { pane: newIndex } );
  • ChartApi#getPaneElements() for getting container elements to each pane. (I need the container to draw legends to each pane)

Things I am also implementing but not going to be included in this PR:

  • React binding with pane and legend supports

@ntf ntf force-pushed the dev-fix-multi-pane-feature-20210823 branch from 51a6e4d to b23da6f Compare September 25, 2021 15:52
@ntf
Copy link
Author

ntf commented Sep 25, 2021

resolved merge conflicts with tradingview's master branch

@qwpto
Copy link

qwpto commented Aug 9, 2022

This PR still merges easily to the master, qwpto@7efe1bc it would be a great feature to have instead of needing to maintain a fork of the project to get it. @ntf how did you generate the inlined code for the jsfiddle?

@FairyWorld
Copy link

resolved merge conflicts with tradingview's master branch

There is a conflict with the latest version. I hope you can solve it

@carere
Copy link

carere commented Jan 5, 2024

Does this feature still in the loop for future release ?
@qwpto Where is the fork with this feature implemented ?

@qwpto
Copy link

qwpto commented Jan 6, 2024

Does this feature still in the loop for future release ? @qwpto Where is the fork with this feature implemented ?

@carere There's a pull request link in my comment above where it can be found.

@rwitzlib
Copy link

rwitzlib commented Feb 7, 2024

Here is an updated fork people can reference if they'd like: https://github.com/rwitzlib/lightweight-charts
Currently updated to v4.1.3 but Ill try to keep this updated until multi-pane is officially supported

@carere
Copy link

carere commented Feb 11, 2024

@rwitzlib Can you explain to me how can I add another pane to the chart with your fork ?

@rwitzlib
Copy link

@rwitzlib Can you explain to me how can I add another pane to the chart with your fork ?

Of course, I left a comment here: #50 (comment) so its a bit easier for people to see

@illetid illetid mentioned this pull request Apr 5, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple panes support
5 participants