Menu

Post image 1
Post image 2
1 / 2
0

fastchart 0.2.0: Native PHP Charts, Barcodes, and QR Codes in One Extension

DEV Community·Ilia Alshanetsky·21 days ago
#d248WFNs
#why#php#webdev#charts#chart#fastchart
Reading 0:00
15s threshold

( new FastChart\StockChart ()) -> setSize ( 1200 , 600 ) -> setTitle ( 'AAPL last 90 days' ) -> setTheme ( FastChart\Chart :: THEME_DARK ) -> setOhlcv ( $ohlcvRows ) -> setMovingAverages ([ 20 , 50 , 200 ]) -> setVolumePane ( true ) -> setCandleStyle ( FastChart\Chart :: STYLE_HOLLOW ) -> renderToFile ( '/tmp/aapl.png' ); Enter fullscreen mode Exit fullscreen mode That's a server-side OHLCV candlestick chart with three moving averages, a volume pane, and a hollow candle style. Roughly 68 ms on a single core at 1920×1080. No microservice, no Node sidecar, no JavaScript runtime. PHP, gd, fastchart. fastchart 0.2.0 shipped two days ago. 19 chart types behind a fluent OO API, plus a Symbol family (Code 128 barcodes and QR codes) that landed in this release. The repo is at github.com/iliaal/fastchart . Why charts in PHP again Twenty years ago, Rasmus and I shipped the initial release of PECL/GDChart in January 2006.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More