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

CandleStick Chart display out off bounds #5075

Open
LFate opened this issue Jun 29, 2023 · 8 comments
Open

CandleStick Chart display out off bounds #5075

LFate opened this issue Jun 29, 2023 · 8 comments

Comments

@LFate
Copy link

LFate commented Jun 29, 2023

This is config code

        chartView.autoScaleMinMaxEnabled = true
        chartView.doubleTapToZoomEnabled = false
        chartView.scaleYEnabled = false
        chartView.minOffset = 0
        chartView.highlightPerDragEnabled = false
        chartView.dragDecelerationEnabled = false
        chartView.dragDecelerationFrictionCoef = 0
        chartView.legend.enabled = false        
        chartView.rightAxis.labelCount = 4
        chartView.rightAxis.spaceTop = 0.1
        chartView.rightAxis.yOffset = -5.0
        chartView.noDataText = "No data".localized
        chartView.noDataFont = UIFont.systemFont(ofSize: 14.0, weight: .medium)
        chartView.noDataTextColor = .systemGray
        chartView.drawOrder = [CombinedChartView.DrawOrder.candle.rawValue, CombinedChartView.DrawOrder.line.rawValue]

When I drag chart, content will be clipped

2023-06-29.15.27.01.mov

Did I set something wrong?

DGCharts Environment

DGCharts version: 4.1.0 - 5.0.0
Xcode version: 14.0
Swift version: 5.0
Platform(s) running DGCharts: iOS

@developerjet
Copy link

doubleTapToZoomEnabled

您好啊,请问解决了么。你的K线完整Demo代码可以发我参考一下不,我最近也在用Chars绘制股票K线,谢谢了。

@LFate
Copy link
Author

LFate commented Oct 30, 2023

doubleTapToZoomEnabled

您好啊,请问解决了么。你的K线完整Demo代码可以发我参考一下不,我最近也在用Chars绘制股票K线,谢谢了。

没解决😂,旧版本正常显示,新版本没找到解决方法

@yiweiwoshiniya
Copy link

@LFate 您好,请问解决了吗

@yiweiwoshiniya
Copy link

@developerjet 您好,请问解决了吗

@LFate
Copy link
Author

LFate commented Apr 8, 2024

@yiweiwoshiniya 没有,后续我没再跟进,我现在用的是旧版本的

@yiweiwoshiniya
Copy link

@LFate hello,谢谢回复,我换成了4.1.0版本,y轴自动更新还是显示不全,你单独时时计算y轴最大和最小值了吗

@LFate
Copy link
Author

LFate commented Apr 8, 2024

@LFate hello,谢谢回复,我换成了4.1.0版本,y轴自动更新还是显示不全,你单独时时计算y轴最大和最小值了吗

我用的应该是3.6的版本,好像从4.0开始就有这个问题。我这边用的旧版本并在ChartDataSet中补充了下面的方法才算能正常使用

    public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element {
            entries.replaceSubrange(subrange, with: newElements)
            notifyDataSetChanged()
    }

@yiweiwoshiniya
Copy link

@LFate hello,谢谢回复,我换成了4.1.0版本,y轴自动更新还是显示不全,你单独时时计算y轴最大和最小值了吗

我用的应该是3.6的版本,好像从4.0开始就有这个问题。我这边用的旧版本并在ChartDataSet中补充了下面的方法才算能正常使用

    public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element {
            entries.replaceSubrange(subrange, with: newElements)
            notifyDataSetChanged()
    }

谢谢,收到,我试试去

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