ChartsOrg / ChartsOrg/Charts

Pie chart labels are cut or overlap with the chart when they are outside

Open
#4,488 2 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?

ℹ I am using pie chart with xValuePosition and yValuePosition outsideSlice configuration

## What did you expect to happen?

ℹ entryLabels to be displayed outside of the chart with proper layout

## What happened instead?

ℹ Depending on the values, entryLabels are not rendered properly, in some cases they might be cut, in some cases they overlap with chart. It seems to me outsideSlice option is quite buggy and positions of entryLabels are not properly calculated.

## Charts Environment

**Charts version/Branch/Commit Number: 3.5.0**
**Xcode version: 12.0**
**Swift version: 5**
**Platform(s) running Charts: iOS**
**macOS version running Xcode: 10.15.6**

## Demo Project


Screenshot 2020-10-09 at 09 37 39

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with a pie chart using xValuePosition and yValuePosition set to outsideSlice, using the attached screenshot and the reported Charts 3.5.0 environment as context. Trace how entryLabels are positioned for outside slices and verify that labels are neither cut off nor overlapping the chart across different values.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
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.