I want to visualize a table of stock-price data as candlesticks; and as trend lines.
I'm looking for a C-callable library that will take as input raw price data and come out with a graphic file -- a picture -- that I can store someplace and then name in the HTML page that my CGI generates.
I suppose that there are many candidates. I find only three possibilities so far this morning:
Can you recommend an approach/library that's straightforward, flexible, rich, and powerful?
The GD library is useful for creating dynamic PNGs.
It is written in C, has good language bindings for PHP, Perl and many other languages, and there are some command line tools for shell programming.
See this question for C programming with GD:
Looking for GD tutorial in C/C++
A Perl library on top of GD that does what you want is here:
https://metacpan.org/pod/GD::Graph::candlesticks
The code sample in there is easy to read, even if you haven't tried perl yet. Then use it as a plain old CGI Script. Or try something more fancy.
Examples:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With