kroitor / asciichart

Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
MIT License
1.87k stars 94 forks source link

Bricks/boxes instead of lines #35

Open jjalonso opened 4 years ago

jjalonso commented 4 years ago

Hello guys

Great project. This is not an issue is a question. I'm interested to use renko charts. Renko is a simple chart where if value increased on a specific amounts for example +20 it will create a upper box/brick and if after it it reduce to -20 the current value then it will show the brick/box down.

I wanted to know if there is a workaround to do it using this lib or if it could be easy to modify and some suggestions for me to do it. On other canvas based chart projects it can be done using range bars. Thanks.

Check the screenshot. And ignore the bars ar the bottom edge also ignore the lines/wicks coming out the bricks. renko_example_gold_futures

kroitor commented 4 years ago

@jjalonso hey) The idea to support candlestick charts and renko charts is great. If you can draw a sample of a black&white Renko chart below using the box-drawing characters and GitHub markdown – we can try to add the support for it. Colorizing the chart is not an issue, however, drawing a readable renko chart with bodies and tails can be tricky. I suggest that you post a sample (draw it by hand) below:

```

your chart drawn with box-characters here

```

jjalonso commented 4 years ago

great, gonna try.

Is not possible to use directly the blocks elements characters for the renko? there is boxes directly as one char.

On Tue, 12 Nov 2019 at 15:52, Igor Kroitor notifications@github.com wrote:

@jjalonso https://github.com/jjalonso hey) The idea to support candlestick charts and renko charts is great. If you can draw a sample of a black&white Renko chart below using the box-drawing characters https://en.wikipedia.org/wiki/Box-drawing_character and GitHub markdown https://guides.github.com/features/mastering-markdown/ – we can try to add the support for it. Colorizing the chart is not an issue, however, drawing a readable renko chart with bodies and tails can be tricky. I suggest that you post a sample (draw it by hand) below:


your chart drawn with box-characters here

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kroitor/asciichart/issues/35?email_source=notifications&email_token=AAC7CWYIPDADF4UNBYGXPZDQTLGKZA5CNFSM4JMDBFWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED2WR2Q#issuecomment-552954090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC7CWZDRAUABGFGR72YFYLQTLGKZANCNFSM4JMDBFWA .

jjalonso commented 4 years ago

Maybe? (wicks are optionals in some renko charts, im happy to not having them atleast)


                  ┏━┓
               ┏━┓┗━┛
┏━┓         ┏━┓┗━┛
┗━┛┏━┓   ┏━┓┗━┛
   ┗━┛┏━┓┗━┛
      ┗━┛
jjalonso commented 4 years ago

there is few geometrical chars too, but not sure if it can be used.

▩ ■

kroitor commented 4 years ago

@jjalonso it could also look like this:

█   █
 █ █ █             ╷    
  █   █    ╷       │ 
       █   █       █
        █ █ █     █ █
         █   █   █│
              █ █ 
               █

We will try to find combinations of symbols to draw it, and will add it, hopefully, soon. If you find a better-looking set of characters for Renko charts, let me know.

jjalonso commented 4 years ago
            ⬛      ⬛
          ⬛  ⬛  ⬛
⬛      ⬛      ⬛
  ⬛  ⬛        
    ⬛

hard to make wicks here

Also found this family interesting https://jrgraphix.net/r/Unicode/2300-23FF

jjalonso commented 4 years ago

2 boxes with wick

 ⎸
██

3 boxes with wick

            ███
        ███  │  ███
 │  ███      │   │  ███
███
yukulele commented 1 year ago

My suggestion (using ▁▂▃▄▅▆▇█ chars)

Screenshot_20221025_161603

jjalonso commented 1 year ago

Sorry for the late reply (years) but Im not working with the lib anymore. Sorry about that.

On Tue, 12 Nov 2019, 15:52 Igor Kroitor, @.***> wrote:

@jjalonso https://github.com/jjalonso hey) The idea to support candlestick charts and renko charts is great. If you can draw a sample of a black&white Renko chart below using the box-drawing characters https://en.wikipedia.org/wiki/Box-drawing_character and GitHub markdown https://guides.github.com/features/mastering-markdown/ – we can try to add the support for it. Colorizing the chart is not an issue, however, drawing a readable renko chart with bodies and tails can be tricky. I suggest that you post a sample (draw it by hand) below:


your chart drawn with box-characters here

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kroitor/asciichart/issues/35?email_source=notifications&email_token=AAC7CWYIPDADF4UNBYGXPZDQTLGKZA5CNFSM4JMDBFWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED2WR2Q#issuecomment-552954090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC7CWZDRAUABGFGR72YFYLQTLGKZANCNFSM4JMDBFWA .

pannet1 commented 7 months ago

unfortunately not seen any project plotting streaming data nicely like asciicharts. candlesticks and indicator plots were required.