-
Notifications
You must be signed in to change notification settings - Fork 409
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
Issue concerning layers (I think) #35
Comments
Can you please provide a self contained example (as text, maybe as a gist)? Don't see the problem in your code. Are you working with the example's code or are there other differences? If it's drawing the line correctly but not the axes it's likely something with the view, not the model data. |
Here a pastebin, and yhea that's what i though with the view. How can the view influence this, do you have more details? http://pastebin.com/V9zKnL7N It's not the direct example, but it's really close, and i don't think there are any big errors, must be the view. Is it possible to resize the graphic so it doesnt take full view space? Or may it be what precisely make it crash? Thanks for your answer Edit: made some cleaning: Here is the code snippet generated graph (with static data, not my json points), inside an empty view. Nothing fancy :/ but still fail. http://imgur.com/PKvmzaL Edit 2: tried again everything from scratch, with fresh new view, the basic code, impossible to have anything else that the plot lines :/ I don't get it, must be on my side but... What do you have with the previous code? I am using the NON-swift2.0 version |
The snippets are still missing the context... Is your view's size already computed when you call getChartFrame? Somebody who was using autolayout had similar issues, see #30, here the solution: https://gist.github.com/i-schuetz/f6e285eb0c86bb831510 Otherwise start with one of the examples and edit it until you can reproduce it, so we know what exactly is causing the issue. If nothing helps please either post the full code, or upload somewhere a project where the issue is reproduced and I'll take a look. |
I think it's on my side, let me spend more time on it before sharing it. Thanks a lot anyway. I keep this open and keep you updated. And yhea my view is already computed, I mean i have a view with 2 date pickers, and when the user pick the 2 dates then the chart is rendered ps: getChartView is the same as in your examples:
|
I am becoming crazy... I don't understand why it won't work. I can use the simplest example, yet I never saw any x or y axis bars. My project is on github, files PowermonitorIOS/viewcontrollers/ChartVC.swift, if you wanna check. I reinstalled SwiftCharts, I deleted my files and recreated them. I don't know what to do EDIT: Found IT! I didn't used Can you explain me how it could have such impact? Is it keeping track of the layers? |
The chart has to be referenced, otherwise it's released, and when This is also why there's an "arc" comment next to the chart declaration in the examples. This is admittedly a bit cumbersome, may change the architecture in the future to prevent it. A possibility would be to implement the chart directly as view, which is always retained. Right now I'm not sure though if this works nicely with the way the library is designed. Sorry for not thinking about this before, I actually also had this issue before adding the instance variables, but totally forgot. |
It's totally fine, you just share you API and I should check everything more carefully. Anyway, thanks for SwiftCharts! It's great |
This issue is more a problem of mine I think, but after many spent time i cannot still figure it out...
Why does this code (rougthly the same as the tracker example one) doesn't display anything else than the curve?
http://imgur.com/Gca5Bxf
The datepicker bug is something else, sorry for it. but only the red plot appears. (i tryed on other circumstances before with full view on the curve)
http://imgur.com/UnmfVaO
It may be trivial but I can't find a logical explanation/solution...
The text was updated successfully, but these errors were encountered: