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

CombinedChartRenderer property : _renderers should be set open #4208

Closed
1 task done
opann opened this issue Nov 8, 2019 · 1 comment
Closed
1 task done

CombinedChartRenderer property : _renderers should be set open #4208

opann opened this issue Nov 8, 2019 · 1 comment

Comments

@opann
Copy link

opann commented Nov 8, 2019

What did you do?

ℹ Try to replace CombinedChartRenderer using custom LineChartRenderer

What did you expect to happen?

ℹ I override the function createRenderers() and replace the LineChartRenderer
, but I found out that it still using the default renderers to draw charts because _renderers
cant be override. So I change the _renderers property prefix from "internal" to "open"
Issue Fixed.
I recommend to change the _renderers property prefix to "open" that makes people can
using custom CombinedChartRenderer

What happened instead?

ℹ _renderers still generate default renderers so I cant using my own LineChartRenderer

Charts Environment

**Charts version/Branch/Commit Number:3.3.0
**Xcode version: 10.3
**Swift version:4.2
**Platform(s) running Charts:iPhone 8
**macOS version running Xcode:10.14.6

Demo Project

ℹ Please link to or upload a project we can download that reproduces the issue.

@liuxuan30
Copy link
Member

liuxuan30 commented Jan 20, 2020

if you are heavily customizing the library, you should grab the source code and make any modifications you want.

the renderers are not intended for any user to override.

and, I think CombinedChartRenderer and CombinedChartView are the classes you should override. You can easily replace the renderer within initialize() in CombinedChartView, and then use your own line chart renderer.

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

No branches or pull requests

2 participants