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

ChartRenderer's must be initialized with a chart #2982

Merged
merged 18 commits into from
Nov 27, 2017
Merged

ChartRenderer's must be initialized with a chart #2982

merged 18 commits into from
Nov 27, 2017

Conversation

jjatie
Copy link
Collaborator

@jjatie jjatie commented Nov 13, 2017

No description provided.

@codecov-io
Copy link

codecov-io commented Nov 13, 2017

Codecov Report

Merging #2982 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2982   +/-   ##
=======================================
  Coverage   19.64%   19.64%           
=======================================
  Files         113      113           
  Lines       13508    13508           
=======================================
  Hits         2653     2653           
  Misses      10855    10855
Impacted Files Coverage Δ
...ce/Charts/Renderers/CandleStickChartRenderer.swift 0% <ø> (ø) ⬆️
Source/Charts/Renderers/LineChartRenderer.swift 55.3% <ø> (ø) ⬆️
...rce/Charts/Renderers/YAxisRendererRadarChart.swift 0% <ø> (ø) ⬆️
...ource/Charts/Renderers/CombinedChartRenderer.swift 0% <ø> (ø) ⬆️
Source/Charts/Renderers/PieChartRenderer.swift 0% <ø> (ø) ⬆️
...ts/Renderers/XAxisRendererHorizontalBarChart.swift 0% <ø> (ø) ⬆️
Source/Charts/Renderers/ScatterChartRenderer.swift 0% <ø> (ø) ⬆️
Source/Charts/Renderers/BarChartRenderer.swift 41.37% <ø> (ø) ⬆️
.../Charts/Renderers/HorizontalBarChartRenderer.swift 0% <ø> (ø) ⬆️
Source/Charts/Renderers/BubbleChartRenderer.swift 0% <ø> (ø) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb02977...e458bd9. Read the comment docs.

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 18, 2017

What's the reason for this?

@jjatie
Copy link
Collaborator Author

jjatie commented Nov 18, 2017

Does it make sense that a ChartRenderer has no chart to render?

My guess is this initializer parameter was made optional because the weak property declaration forced the property to be declared as optional.

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 20, 2017

@objc open weak var dataProvider: BarChartDataProvider? is declared as weak, sounds like a historical reason or habit to use optional for params.

This PR is in conjunction with #2981 to make animator non nil as well.

Looks fine to merge. I will take a deeper look at both PRs and original code.

BTW @jjatie among your PRs, is there any dependency/order to merge? I saw these two PRs are straightforward and can pass CI as the main reason to merge in short time.

@liuxuan30 liuxuan30 self-assigned this Nov 20, 2017
@liuxuan30 liuxuan30 self-requested a review November 20, 2017 00:58
Copy link
Member

@liuxuan30 liuxuan30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CombinedChartRenderer also has similar footprint,

@objc public init(chart: CombinedChartView?, animator: Animator, viewPortHandler: ViewPortHandler?)

shall we change it as well?

@jjatie
Copy link
Collaborator Author

jjatie commented Nov 20, 2017

Oops, I missed that one. Fixing now.

@jjatie
Copy link
Collaborator Author

jjatie commented Nov 20, 2017

Any PR that has a dependency on another as a comment indicating that. For the most part there are no dependencies.

@liuxuan30 liuxuan30 mentioned this pull request Nov 22, 2017
@liuxuan30
Copy link
Member

liuxuan30 commented Nov 24, 2017

oops, conflicts. when you solve I will check again.
I think we need a way to reduce this kind of conflicts, it causes more work for you @jjatie. One PR merged and similar ones conflicted.

@jjatie
Copy link
Collaborator Author

jjatie commented Nov 24, 2017

@liuxuan30 Fixed, but pull #2980 first. While in some cases I might be able to consolidate some PRs, I think for the most part they should be separate.

@jjatie jjatie mentioned this pull request Nov 24, 2017
@liuxuan30
Copy link
Member

liuxuan30 commented Nov 27, 2017

this can be next to merge? have to work then. check back later

@jjatie
Copy link
Collaborator Author

jjatie commented Nov 27, 2017

Yes. It's fixed

@liuxuan30 liuxuan30 merged commit 0f74a25 into ChartsOrg:master Nov 27, 2017
@liuxuan30
Copy link
Member

liuxuan30 commented Nov 27, 2017

squash to merge for this PR

@jjatie jjatie deleted the renderer-chart-nonnil branch November 27, 2017 08:32
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.

None yet

3 participants