mirror of
https://github.com/seigler/cryptohistory.org
synced 2025-07-27 09:46:10 +00:00
feat: add "filled" chart type
This commit is contained in:
parent
945ad8d2be
commit
5e4e6277c8
2 changed files with 20 additions and 8 deletions
|
@ -18,7 +18,7 @@ $router->map('GET', '/', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// map cryptocurrency stuff
|
// map cryptocurrency stuff
|
||||||
$router->map( 'GET', '/charts/[dark|light|sparkline|candlestick:theme]/[a:curA]-[btc|usdt:curB]/[a:duration]/[svg|png:format]', function($theme, $curA, $curB, $duration, $format) {
|
$router->map( 'GET', '/charts/[dark|light|sparkline|candlestick|filled:theme]/[a:curA]-[btc|usdt:curB]/[a:duration]/[svg|png:format]', function($theme, $curA, $curB, $duration, $format) {
|
||||||
require __DIR__ . '/views/chart.php';
|
require __DIR__ . '/views/chart.php';
|
||||||
return renderChart(
|
return renderChart(
|
||||||
$theme,
|
$theme,
|
||||||
|
|
|
@ -102,15 +102,27 @@ function renderChart(
|
||||||
'xAxisEnabled'=>false
|
'xAxisEnabled'=>false
|
||||||
],
|
],
|
||||||
'candlestick'=>[
|
'candlestick'=>[
|
||||||
'width' => 800,
|
'width'=>800,
|
||||||
'height' => 250,
|
'height'=>250,
|
||||||
'barColor' => '#000',
|
'barColor'=>'#000',
|
||||||
'risingColor' => '#0D0',
|
'risingColor'=>'#0D0',
|
||||||
'fallingColor' => '#D00',
|
'fallingColor'=>'#D00',
|
||||||
'labelColor' => '#000',
|
'labelColor'=>'#000',
|
||||||
'fontSize' => 15,
|
'fontSize'=>15,
|
||||||
'yAxisEnabled'=>true,
|
'yAxisEnabled'=>true,
|
||||||
'xAxisEnabled'=>false
|
'xAxisEnabled'=>false
|
||||||
|
],
|
||||||
|
'filled'=>[
|
||||||
|
'width'=>800,
|
||||||
|
'height'=>250,
|
||||||
|
'lineColor'=>'#000',
|
||||||
|
'labelColor'=>'#000',
|
||||||
|
'smoothed'=>true,
|
||||||
|
'fontSize'=>15,
|
||||||
|
'yAxisEnabled'=>true,
|
||||||
|
'xAxisEnabled'=>false,
|
||||||
|
'yAxisZero'=>true,
|
||||||
|
'filled'=>true
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue