答案 0 :(得分:0)
要设置轴的最小值,需要设置轴的dumpautoload
属性。
例如在swift中:
customAxisMin
要删除圈子,您必须在lineChartView.leftAxis.customAxisMin = 0
drawCirclesEnabled
属性设置为false
答案 1 :(得分:0)
对于点,请禁用dataSet.isDrawCirclesEnabled
。
对于范围,请在下面查看。顺便说一句,你必须明白,因为你有7个x轴值,它默认会绘制每个x轴值。如果需要细粒度控制,则需要更改渲染器逻辑。
您可以将最大范围设置为4,因此仅显示4个x轴值,否则您只应将4个数据值传递到图表中。
/// Sets the size of the area (range on the x-axis) that should be maximum visible at once (no further zomming out allowed).
/// If this is e.g. set to 10, no more than 10 values on the x-axis can be viewed at once without scrolling.
public func setVisibleXRangeMaximum(maxXRange: CGFloat)
{
let xScale = _deltaX / maxXRange
_viewPortHandler.setMinimumScaleX(xScale)
}
/// Sets the size of the area (range on the x-axis) that should be minimum visible at once (no further zooming in allowed).
/// If this is e.g. set to 10, no less than 10 values on the x-axis can be viewed at once without scrolling.
public func setVisibleXRangeMinimum(minXRange: CGFloat)
{
let xScale = _deltaX / minXRange
_viewPortHandler.setMaximumScaleX(xScale)
}
答案 2 :(得分:0)
如果您只想显示4个间隔,则可以将标签计数设置为4。
chartView.xAxis.labelCount = 4
要隐藏圆圈,请禁用ChratDataSet的drawCircleEnabled
chartDataSet.drawCirclesEnabled = false