ChartsOrg / ChartsOrg/Charts

Minor grid lines

Open
#2,119 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

Has anyone used Charts 3.x to successfully draw minor grid lines in between labels?
screen shot 2017-01-26 at 1 32 26 pm
I see a couple approaches to accomplish this - one is to use the transformer class to draw custom subviews at the in-between points. When I do this, however, the gridlines appear on top of the data set entries (even if I send them to the back of the view hierarchy) which is undesirable.
![screen shot 2017-01-26 at 2 13 52 pm](https://cloud.githubusercontent.com/assets/1930139/22346330/b2d4a99a-e3d1-11e6-9f05-c65bee5844a7.png)

The other approach would be a custom formatter that generates empty string labels on odd-numbered indices, which doesn't seem particularly elegant.

What do you think? Would one approach be preferable to the others based on current/future API? (or another approach that I am missing? some core graphics + chart view delegate method?)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Charts 3.x transformer and custom formatter approaches mentioned in the issue, then inspect chart-view delegate and Core Graphics drawing options. The issue does not name files or tests; completion would require choosing and documenting or implementing an API-supported way to draw minor grid lines beneath data entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.