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

Refactor DataLayer/ChartApi #270

Closed
timocov opened this issue Nov 27, 2019 · 0 comments · Fixed by #486
Closed

Refactor DataLayer/ChartApi #270

timocov opened this issue Nov 27, 2019 · 0 comments · Fixed by #486
Assignees
Labels
enhancement Feature requests, and general improvements.
Milestone

Comments

@timocov
Copy link
Contributor

timocov commented Nov 27, 2019

It's really unclear that series is cleared in DataLayer, the palette filled in DataLayer (_setNewPoints) but the data set to series in ChartApi. I suppose to refactor it in future releases. There is several key points:

  • If we clear timescale, should we clear all series as well (see ChartApi::updateTimeScale) ? I guess yes.
  • We don't need to modify or clear existent series' data (including palette) in DataLayer at all, because ChartApi is the guy who sends updates to chart's parts (series, timescale, etc) and the only it should do it.
  • In addition to previous point - I think DataLayer should prepare a bit more complex timescaleUpdate without modifying anything outside of its own data/props.

Originally posted by @timocov in #269 (comment)

@timocov timocov added the enhancement Feature requests, and general improvements. label Nov 27, 2019
@timocov timocov added this to the 1.3.0 milestone Nov 27, 2019
@timocov timocov changed the title Recator DataLayer/ChartApi Refactor DataLayer/ChartApi Nov 27, 2019
@timocov timocov modified the milestones: 1.3, 1.4 Feb 6, 2020
@timocov timocov modified the milestones: 3.0, Future Mar 6, 2020
@timocov timocov modified the milestones: Future, 3.0 May 1, 2020
@timocov timocov modified the milestones: 3.0, 3.1 Jun 1, 2020
@timocov timocov self-assigned this Jun 12, 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
@timocov timocov linked a pull request Jun 18, 2020 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, and general improvements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant