We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, is this library support Candle Stick Chart type?
The text was updated successfully, but these errors were encountered:
Not exactly, but there is a box and whisker graph which looks very similar. It is described on this page: https://www.goat1000.com/svggraph-misc.php
I could add a candle stick chart quite easily since it is so similar to the box and whisker type.
Sorry, something went wrong.
I've added a CandlestickGraph graph type in commit b61f1af - here's an example graph using some random data:
CandlestickGraph
<?php require_once 'SVGGraph/autoloader.php'; $options = [ 'structure' => [ 'key' => 0, 'value' => 1, // close 'open' => 2, 'low' => 3, 'high' => 4, ], 'axis_font' => 'Arial', 'axis_text_angle_h' => 90, 'bar_space' => 5, 'axis_min_v' => 1700, ]; $close = 1820; $seed = 1241231; srand($seed); $values = []; for($i = 1; $i < 32; ++$i) { $date = sprintf('Oct %02d', $i); $open = $close; $close = $close + rand(-30, 40); $low = min($open, $close) - rand(0, 40); $high = max($open, $close) + rand(0, 80); $values[] = [$date, $close, $open, $low, $high]; } $g = new \Goat1000\SVGGraph\SVGGraph(600, 400, $options); $g->values($values); $g->colourRangeHexHSL(0, '#0c4', '#0c9'); $g->colourRangeHexHSL(1, '#f00', '#f55'); $g->render('CandlestickGraph');
This is what it looks like:
goat1000
No branches or pull requests
Hi,
is this library support Candle Stick Chart type?
The text was updated successfully, but these errors were encountered: