alincoop / obsidian-tinychart

Dead simple ASCII charts for Obsidian.
MIT License
36 stars 0 forks source link

FR: padding & per-chart options #2

Open chrisgrieser opened 5 months ago

chrisgrieser commented 5 months ago

First, thanks for this nice plugins. Just replaced the charts plugin with it.

So, two small annoyances I encountered are these:

  1. The value labels are left-aligned. However, they should rather be right aligned:
    
    # current
    1234
    12

desired

1234 12



2. different charts have different label lengths, so that it would make sense for each chart to use individual length settings. However, it seems I can set the length only globally in the plugin settings, and not on a per-chart-basis.

Also, it would be nice to set the fill character on a per-chart basis as well to differentiate the charts.
![Pasted image 2024-05-03 at 20 47 35@2x](https://github.com/alincoop/obsidian-tinychart/assets/73286100/9f27417a-dd24-4b8d-9a0a-b0994b042f43)
alincoop commented 5 months ago

Thank you, Chris.

I have added the option to right-align the value labels (see version 0.1.1) and will work on per-chart configuration options, to override global settings such as chart length.

alincoop commented 5 months ago

@chrisgrieser - Regarding chart length, what do you think of the following approaches which standardise the total chart length by either padding the label (A) or expanding the bar chart (B)?

Let me know if this would be helpful and which style you prefer, I can implement it sooner than per-chart settings.

image
chrisgrieser commented 5 months ago

what do you think of the following approaches which standardise the total chart length by either padding the label (A) or expanding the bar chart (B)?

yes, I think this would be a good solution. Saves you the trouble of having to set the length for each graph individually