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

Margin insets not changing during zoom when formatter changes output width #72

Closed
MartinPajak opened this issue May 6, 2015 · 4 comments

Comments

@MartinPajak
Copy link

I created my own numberformatter for yAxis labels like this:

    var axisFormatter = NSNumberFormatter()
    axisFormatter.locale = NSLocale.currentLocale()
    axisFormatter.numberStyle = NSNumberFormatterStyle.DecimalStyle
    axisFormatter.usesGroupingSeparator = false
    axisFormatter.generatesDecimalNumbers = true

Later then, when I zoom into the data so that the formatter changes output width for example from 49 to 49.5 the margin of the chart doesn't change until I rotate to landscape/portrait. Without rotating there seems to be no chance to get the numbers full visible.

@danielgindi
Copy link
Collaborator

@PhilJay do you think we should recalculate the X axis width for each frame? or can we know that the axis has changed?

@danielgindi
Copy link
Collaborator

@PhilJay maybe we should call calculateOffsets() when done zooming/dragging, so the Y-Axis width will be recalculated according to the visible labels

@PhilJay
Copy link
Collaborator

PhilJay commented May 8, 2015

Yes that could be an option :-)
I hope that the performance overhead is not too big tough

@danielgindi
Copy link
Collaborator

If we're doing it only when finishing a zoom - that would not have a
performance impact, it will work like when zooming in on maps - they zoom
in the original rasterized data, and when finishing zoom they re-render the
vector data

On Fri, May 8, 2015 at 11:07 AM, Philipp Jahoda notifications@github.com
wrote:

Yes that could be an option :-)
I hope that the performance overhead is not too big tough


Reply to this email directly or view it on GitHub
#72 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants