ChartsOrg / ChartsOrg/Charts

rightAxis.labelXOffset moving label up/down on HorizontalBarChartView

Open
#4,505 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

* [x] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md).

## What did you do?

Created a `HorizontalBarChartView` and added `rightAxis.labelXOffset`

## What did you expect to happen?

Expected x position of label to changed depending on value.

## What happened instead?

Y position of labels changed.

## Charts Environment

**Charts version/Branch/Commit Number:** 3.6.0
**Xcode version:** 12
**Swift version:** 5.0
**Platform(s) running Charts:** iOS
**macOS version running Xcode:** 10.15.4

## Demo Project

Can be tested on demo project.

`HorizontalBarChartViewController` with `rightAxis.labelXOffset = 0`

![Screen Shot 2020-11-18 at 3 01 42 pm](https://user-images.githubusercontent.com/1027660/99481825-0d0e7900-29af-11eb-87c5-d754be688869.png)

`HorizontalBarChartViewController` with `rightAxis.labelXOffset = 10`

![Screen Shot 2020-11-18 at 3 00 38 pm](https://user-images.githubusercontent.com/1027660/99481828-113a9680-29af-11eb-9556-eff8d45d99c8.png)

Contributor guide

Open the contributing guide

Research direction

Start with the demo project's HorizontalBarChartViewController and reproduce the behavior using rightAxis.labelXOffset values of 0 and 10. Trace how the HorizontalBarChartView renders right-axis labels and determine why the offset changes their Y position instead of X position. Done means the offset changes only the label's X position, verified in the demo on iOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
data-visualization, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.