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

BarChar Position Label #2546

Closed
nija78 opened this issue Jun 21, 2017 · 1 comment
Closed

BarChar Position Label #2546

nija78 opened this issue Jun 21, 2017 · 1 comment

Comments

@nija78
Copy link

nija78 commented Jun 21, 2017

unadjustednonraw_thumb_117
It's possible to display the label of negative Value on the top of the bar instead of botom?

@thierryH91200
Copy link
Contributor

thierryH91200 commented Jun 23, 2017

capture d ecran 2017-06-23 a 17 31 44

in BarChartRenderer.swift
open override func drawValues(context: CGContext)

 if dataSet.isDrawValuesEnabled
                        {
                            drawValue(
                                context: context,
                                value: formatter.stringForValue(
                                    val,
                                    entry: e,
                                    dataSetIndex: dataSetIndex,
                                    viewPortHandler: viewPortHandler),
                                xPos: x,
                                yPos: abs(val) >= 0.0  <-------------------- line modified val always >0
                                    ? (rect.origin.y + posOffset)
                                    : (rect.origin.y + rect.size.height + negOffset),
                                font: valueFont,
                                align: .center,
                                color: dataSet.valueTextColorAt(j),
                                rotationAngle: valueRotationAngle)
                        }

It's your turn
Add a variable or what you want
why not a PR

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

No branches or pull requests

3 participants