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

Remove series then scroll to right after not working. #355

Closed
nakcyber opened this issue Feb 24, 2020 · 4 comments · Fixed by #486
Closed

Remove series then scroll to right after not working. #355

nakcyber opened this issue Feb 24, 2020 · 4 comments · Fixed by #486
Assignees
Labels
bug Unexpected problem or unintended behavior.
Milestone

Comments

@nakcyber
Copy link

Hi, lightweight-charts team
I am facing an issue with lightweight-charts.

Lightweight Charts Version: 1.2.2

Steps/code to reproduce:

  • AddLineSeries when click on button 2001 , 2002 ,2003 to add more series.
  • Click a button following step on button 2003 and button 2002 to remove selected series.
  • Scroll chart to the end of the right side after removing a series.

Actual behavior:
Show Uncaught Error: Value is null;

Expected behavior:
Don't show Uncaught Error: Value is null;

Screenshots
https://drive.google.com/file/d/1Ws0Q2y6md0ZxxpaRLrolUuBbBiZbYhup/view

CodeSandbox/JSFiddle/etc link:

https://stackblitz.com/edit/js-eivupz?file=index.js

@timocov
Copy link
Contributor

timocov commented Feb 24, 2020

AddLineSeries when click on button 2001 , 2002 ,2003 to add more series.

Looks like nothing happened when I click on that buttons.

@timocov
Copy link
Contributor

timocov commented Feb 24, 2020

Ah ok I got it, just removed window.addEventListener('load', function () { wrapper.

@timocov timocov added the bug Unexpected problem or unintended behavior. label Feb 24, 2020
@timocov
Copy link
Contributor

timocov commented Feb 24, 2020

Looks like this happened only in case of subscription on subscribeVisibleTimeRangeChange.

@timocov timocov added this to the 2.1 milestone Feb 24, 2020
@timocov
Copy link
Contributor

timocov commented May 1, 2020

Related to #270

@timocov timocov modified the milestones: 3.0, 3.1 Jun 1, 2020
@timocov timocov self-assigned this Jun 18, 2020
timocov added a commit that referenced this issue Jun 18, 2020
- Removed series clearing/modification from DataLayer - now it's responsibility is the only generate data updates
- DataLayer now generates baseIndex for timescale so we don't need to calculate it manually in chart model
- Removed Palette class, now we provide a color inside PlotRow (and any additional data for a bar)
- PlotRow is not generic now, if you'd like to add properties to it - just extend it
- PlotRow's value now contains the only 4 items (open, high, low, close), and they are always numbers
- Removed supporting empty values in PlotList
- Removed redundant each method from PlotList
- Refactored TickMarks algorithm
- Time scale points now contains time and time weight

Fixes #355 #270
@timocov timocov mentioned this issue Jun 18, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants