ChartsOrg / ChartsOrg/Charts

How to display Y axis maximum value without setting axisMinimum ?

Open
#4,398 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I love this library. I have a question. I want to display maximum value of Y aixs automatically. I don't want to set leftAxis.axisMaximum. Middle value is displayed automatically, but maximum value is now shown. I set maximum value, but it is not displayed. I guess that my value is not match with computeAxisValues() in your library.
How can I display Y Aix's maximuim value atomically?

let leftAxis = chartView.leftAxis
leftAxis.labelFont = .systemFont(ofSize: 10)
leftAxis.labelCount = 2
leftAxis.valueFormatter = DefaultAxisValueFormatter(formatter: leftAxisFormatter)
leftAxis.labelPosition = .outsideChart
leftAxis.spaceTop = 0.15
leftAxis.axisMinimum = 0
// leftAxis.axisMaximum = 200

iPhone_Xs__13_5_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.