ChartsOrg / ChartsOrg/Charts

Feature request - make LineChartRenderer inheritable

Open
#5,082 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I needed to subclass `LineChartRenderer` and override its method `drawCircles(context:)`. It is private but ok, I can override `drawExtras(context:)`.
The problem is these methods involve a lot of private/internal methods which are not accessible. So instead of overriding a single method I need to subclass `LineRadarRenderer` (superclass of `LineChartRenderer`), copy a variable, 2 internal methods, 3 extensions (which are not accessible outside this module) and a global function.

Linked problems:
https://github.com/danielgindi/Charts/issues/3258
https://github.com/danielgindi/Charts/issues/5081

Contributor guide

Open the contributing guide

Research direction

Start with LineChartRenderer.drawCircles(context:) and drawExtras(context:), then trace the private and internal methods, extensions, variable, and global function involved in their implementation. Compare the linked issues for context. Done means LineChartRenderer can be subclassed to customize circle drawing without copying inaccessible LineRadarRenderer internals.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.