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

Using Charts in NSStackView #2626

Closed
jwr1995 opened this issue Jul 21, 2017 · 3 comments
Closed

Using Charts in NSStackView #2626

jwr1995 opened this issue Jul 21, 2017 · 3 comments

Comments

@jwr1995
Copy link

jwr1995 commented Jul 21, 2017

I am trying to display multiple line charts in a stack view but I am having problems with the charts collapsing and only displaying one chart at a time. I have established the frame is zero sized and the layout is ambiguous so I thought perhaps it just needed NSLayoutConstraints adding to it, however I tried this for the width and height of the chart and I have tried using chart .setFrameSize as well but still only one chart would display in the stack view at any one time and would fill the entire view even though the stack view was set to fill equally.

Here is the type of thing I am trying to code for each required LineChartView where chartViewArray holds and array of LineChartViews:

 for i in 0...numberOfChannels-1 {
                    chartViewArray[i].noDataText = "Could not load channel \(i+1) data"
                    chartViewArray[i].data = setChart(values: self.audioArray[i], channel: i+1)
                    chartViewArray[i].chartDescription = nil
                    chartViewArray[i].setFrameSize(NSSize(width: 2, height: 2))
                    stackView.addView(chartViewArray[i], in: NSStackViewGravity.bottom)
                }
@liuxuan30
Copy link
Member

This should be asked on StackOverflow. Looks like you are using NSSTackView incorrectly.

@atalayasa
Copy link

@jwr1995 Did you find a solution for your problem ?

@jwr1995
Copy link
Author

jwr1995 commented Aug 28, 2018

@atalayasa nope couldn't figure it out

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