phibr0 / obsidian-charts

Charts - Obsidian Plugin | Create editable, interactive and animated Charts in Obsidian via Chart.js
https://charts.phib.ro/
GNU Affero General Public License v3.0
568 stars 26 forks source link

Strange scroll behaviour of file with charts #38

Open moose-x86 opened 2 years ago

moose-x86 commented 2 years ago

Hi, I have a problem with strange behavior when scrolling up file where charts are embedded. I'm scrolling to bottom of the file everything is fine, but when I scroll up charts disappear and also scroll behaves strangely. I see this issue only in file with charts. Tried to disable all other plugins, but there is no change. I attached small video to visualize problem. This issue I see on 0.12. and 0.13. version of obsidian.

Peek 2022-01-17 10-57

phibr0 commented 2 years ago

Could you check the console for errors? (CTRL + Shift + I) The scrolling issue comes from Obsidian unloading contents not in the view and not knowing the size of the chart if its not rendered. But it should reappear correctly when scrolling up again.

moose-x86 commented 2 years ago

When I add side by side pane, charts are rendering. There is a small glitch when scrolling, but at least charts are not disappearing. On mobile version charts are rendering, so it looks like it is somehow connected with width of pane(maybe).

Peek 2022-01-17 11-35

From charts I think there is only one error

image ``

moose-x86 commented 2 years ago

Also attaching file data.md on which I see issue. System which I test is Debian 11 and Obsidian is appImage.

phibr0 commented 2 years ago

Does this still occur? I can't reproduce this

moose-x86 commented 2 years ago

yes, it still happens. On latest charts and obsidian 0.13.33 I see this problem, maybe a little bit less frequently(hard to say). i noticed that on default theme it works a little bit better but on Obuntu theme it looks more bugy. Maybe try to change a theme Peek 2022-03-23 23-47

BTW. On mobile version I also see this, but need to rotate into landscape mode.

moose-x86 commented 2 years ago

Oh and one funny thing. Legened disappered from charts after update. Now I need to set legend: true in order to have it. Is this a feature? In manual there is no mention of it.

moose-x86 commented 2 years ago

One more thing. It is interesting that problem occurs in preview mode. In live preview it works almost ok(small glitch when scrolling, but charts are rendering in correct way.)

phibr0 commented 2 years ago

Oh and one funny thing. Legened disappered from charts after update. Now I need to set legend: true in order to have it. Is this a feature? In manual there is no mention of it.

will be fixed

phibr0 commented 2 years ago

One more thing. It is interesting that problem occurs in preview mode. In live preview it works almost ok(small glitch when scrolling, but charts are rendering in correct way.)

I might (?) have a fix for that, but as I cannot reproduce the Issue, I dont know if it works.

moose-x86 commented 2 years ago

One more thing. It is interesting that problem occurs in preview mode. In live preview it works almost ok(small glitch when scrolling, but charts are rendering in correct way.)

I might (?) have a fix for that, but as I cannot reproduce the Issue, I dont know if it works.

Maybe I could provide you with some configuration files? If needed. If there will be some kind patch I can patch code manually a test that.

moose-x86 commented 2 years ago

Also it is strange that you are not able to reproduce it, I did not do anything strange with configuration. On desktop I have many plugins, but tried to remove them all and bug was still there. On android device I have even less plugins and issue is still the same.

moose-x86 commented 2 years ago

Also one interesting thing is that sometimes font changes color I don't know if this is related. i see this on android also. image

moose-x86 commented 2 years ago

And one more thing about this scroll issue. I noticed today that changing from dark mode to light mode makes this bug go away for some time(until I don't change a file). When it returns changing back to dark mode also helps for some time.

moose-x86 commented 2 years ago

Hi. Any updates?

moose-x86 commented 10 months ago

I noticed that changing option Readable line length to On in Editor settings, fixes issue. So I believe that this might be connected.