obsidian-tracker
obsidian-tracker copied to clipboard
Changing the size of the chart
I tried looking for a way to change the plotted graph area, but couldn't find any way. Can the area or the size of the graph be changed?
Currently it previews as a square block, I intend to have it full page width and maybe scrollable too. Possible?
Parameter fixedScale
and fitPanelWidth
are prepared for you!
Please also check the example here.
These functions are just scaling the image..not per se extending the width only. I mean, the y-axis should be extendable, right?
Hi, do you mean change the aspect ratio of the chart area? Keep the height and increase the width only?
I wish to increase the y-axis. Not like stretching the whole "image"
If you just want to extend the range of y values on y-axis, use parameter yMin
and yMax
.
But if you want to change the 'length' of y-axis only, the current code does not allow it.
That should be taken carefully or the entire layout would be messed up.
Okay, thanks! :)
+1 for this, that would be amazing
+1, being able to control the relative slope of trend lines is really important. (Anything too far away from 45° becomes unreadable.) For a lengthy treatment of this and a really fancy solution, read https://idl.cs.washington.edu/files/2006-Banking-InfoVis.pdf. Or just look at this first example from the paper:
Automatic aspect ratio correction would be really cool, but for starters just being able to set that manually would be tremendously valuable. (Right now, I'm extending either x or y axis with bogus space to control the aspect ratio, which wastes a lot of space - usually around 60-75% - and makes one of the axes hard to read.)
+1 for this!
Especially full-width graphs would be great to have
Hey! Just want to +1 full-width graphs. This is becoming crucial for me as my tracker graphs age, and more and more data gets packed into a tiny horizontal space. It's becoming harder over time to derive meaning from the graph. You can see what I mean here.
I noticed this feature isn't on the roadmap. Does it seem like something you'll be able to implement at some point?
I wish we could pay to support your efforts!
Since this is getting more an more annoying, I dug into the source a bit... as far as I can tell, for line graphs, all it takes is to change this line (or its equivalent in the generated JS) from the current (300, 300)
to e.g. (300, 75)
, and things Just Work™.
So @neonplants if you're only using line graphs, consider searching in the code in .obsidian/plugins/obsidian-tracker/main.js
for dataAreaSize
and adjusting it to your desired aspect ratio. (That plus fitPanelWidth: true
in the plot YAML should make things quite readable.) Be aware that this will mess up pretty much all other plot types.
And @pyrochlore:
That should be taken carefully or the entire layout would be messed up.
Since – at least for line graphs – this isn't actually true:
…it would be really great if that was added as an option in the YAML. (E.g. as aspectRatio
with a default of 1.0
, and instead of (300, 300)
, you'd use (300, 300/aspectRatio)
, with aspectRatio
defaulting to 1 for all graphs where it doesn't make sense to change it.)
Thanks @229c9cf0 ! It's rough because I do use the other graph types extensively. @pyrochlore what do you think?
Is there any update on this?
This is such a feature rich plugin. Which is why I was all the more surprised that there was no way to change the aspect ratio from the current 1:1 to something more suitable for line graphs like 4:1 or similar. Especially since the fix seems so easy as outlined above.
Adding this feature would be highly appreciated 🙂
+1 <3
+1 for sure!
+1 for sure!
Hi, to complete @229c9cf0 's suggestion : it seems to work perfectly using "600, 300" instead. The axes and ticks keep their original sizes.
+1
+1 from me
+1 from me
+1 from me - 1:1 makes allot of charts unreadable
+1 from me
1.12.0 (just released) adds an aspectRatio
parameter that should solve for this issue. See #239