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

Add more render options for y axis labels #3406

Merged
merged 1 commit into from
Jun 10, 2018

Conversation

alexrepty
Copy link
Contributor

Goals ⚽

If the user chooses not to display the inner web, the adjusted x position for y axis labels in a RadarChartView() looks off, therefore this commit introduces two additional properties that allow for centering these labels.

Implementation Details 🚧

The renderer used a hardcoded value of 10.0 points to shift the labels to the right, this has been changed to include a new property (labelXOffset) to let the user configure this value for their needs.

The NSTextAlignment for rendering the labels was also hardcoded to .left, I've introduced a new property called labelAlignment to allow users to configure this if needed.

Both of the previously hardcoded values have been set as the default value for the newly added properties.

Testing Details 🔍

No testing has been added as part of these changes.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@6b730a0). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #3406   +/-   ##
========================================
  Coverage          ?   29.2%           
========================================
  Files             ?     117           
  Lines             ?   13306           
  Branches          ?       0           
========================================
  Hits              ?    3886           
  Misses            ?    9420           
  Partials          ?       0
Impacted Files Coverage Δ
Source/Charts/Components/YAxis.swift 83.05% <ø> (ø)
...rce/Charts/Renderers/YAxisRendererRadarChart.swift 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b730a0...4b00c8f. Read the comment docs.

@pmairoldi pmairoldi changed the base branch from master to 4.0.0 June 10, 2018 22:30
@pmairoldi pmairoldi changed the base branch from 4.0.0 to master June 10, 2018 22:31
@pmairoldi pmairoldi self-requested a review June 10, 2018 22:32
Copy link
Collaborator

@pmairoldi pmairoldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@pmairoldi pmairoldi merged commit 0d33db4 into ChartsOrg:master Jun 10, 2018
@alexrepty alexrepty deleted the y-axis-label-enhancements branch October 18, 2018 12:22
danielgindi added a commit that referenced this pull request Jan 23, 2020
+ also consider other renderers

Fixes #3406
IncredibleStar added a commit to IncredibleStar/daniel-charts that referenced this pull request May 26, 2021
rcblue added a commit to rcblue/Charts that referenced this pull request Jan 6, 2023
SwiftPolar pushed a commit to SwiftPolar/Charts that referenced this pull request Mar 20, 2023
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

Successfully merging this pull request may close these issues.

3 participants