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

TICK in Windows 10 (power shell) looks like small question marks ? #85

Open
aelfakih opened this issue Jul 20, 2021 · 1 comment
Open

Comments

@aelfakih
Copy link

I am using Chart to show a bar graph and the individual "TICK" marks show up as question mark. Been trying to debug it and I was able to make it work when I change TICK from the defined quoted value to

TICK = u"\u2588"

At that point I get a solid color block in whatever color defined. I tried to

from termgraph import termgraph as tg
from collections import defaultdict
C = tg.AVAILABLE_COLORS

 TICK = u"\u2588"

    tg.chart (
        colors=[C["green"] , C["yellow"]] ,
        data=[[nft , og]] ,
        args=defaultdict (bool ,
            {
                "stacked" : True ,
                "custom_tick": TICK,
                "width" : 60 ,
                "format" : "{:<5.2f}" ,
                "no_labels" : True ,
                "suffix" : f" (NFT:{nft} ({nft_pct:.0f}%), OG:{og} ({og_pct:.0f}%))"
            } ,
        ) ,
        labels=[""] ,
    )

and the class would not reflect the overwrite of the TICK variable passed. I reviewed the code of the library and the TICK is a global value that is changed when is passed via the argument, but not when I import the package.

What do you recommend is the best approach to fix the definition of TICK so that it will show properly in windows 10.

-- Adonis

@mkaz
Copy link
Owner

mkaz commented Sep 4, 2021

Is the terminal being used support UTF-8?

The \u2588 is a standard unicode character for the full block.
https://www.fileformat.info/info/unicode/char/2588/index.htm

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

2 participants