-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Named axis support #2387
Named axis support #2387
Conversation
Wow, you have been helping a lot!
Supporting only 90 degree at beginning is fine and we can handle the new test cases later |
} | ||
else | ||
{ | ||
if labelPosition == .outsideChart | ||
{ | ||
textAlign = .left | ||
xPos = viewPortHandler.contentRight + xoffset | ||
|
||
xPosName = viewPortHandler.chartWidth - 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is 5 here?
@@ -44,6 +44,7 @@ open class YAxisRenderer: AxisRendererBase | |||
let labelPosition = yAxis.labelPosition | |||
|
|||
var xPos = CGFloat(0.0) | |||
var xPosName = CGFloat(0.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xPosName
is a little confusing here. how about xNamePos
or other style?
if xAxis.isEnabled && xAxis.isDrawLabelsEnabled | ||
{ | ||
let xlabelheight = xAxis.labelRotatedHeight + xAxis.yOffset | ||
|
||
var size = NSSize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis CI for tvOS and iOS fails here, maybe NSUISize()?
Codecov Report
@@ Coverage Diff @@
## master #2387 +/- ##
==========================================
+ Coverage 19.66% 19.67% +0.01%
==========================================
Files 112 112
Lines 13713 13910 +197
==========================================
+ Hits 2696 2737 +41
- Misses 11017 11173 +156
Continue to review full report at Codecov.
|
1 do you consider adding some offset for the left/right of the name? (bottom/top for x axis). 2 seems you forgot horizontal bar chart and radar/pie? Seeing separate axis renderer for them. Maybe we can consolidate in a common place so we can reuse them PieChartView |
Oh I forgot. Seems we can ignore pie/radar chart's for now, since their axis is not normal, and we don't have requests for displaying name? |
@thierryH91200 I was thinking, if there are demands, such as the inter space between the name and axis line? I see you are just using existing I am not sure if we should use separate "axisName Left/Right/Top/Bottom/ Space" for them. Any other people who have ideas? |
I was not very pleased with me Open var nameRectBottom = CGRect () For BarLineChartViewBase For HorizontalBarChartView |
LOL, take your time:) |
Hi, was this supported for iOS? I have checked in the latest version but don't see it |
please add this feature @danielgindi :) |
Hello @danielgindi, Is this feature reviewed ? |
is this feature in the current released version? |
add
I think it should have success like PR