No description
Find a file
2016-06-28 00:17:49 -04:00
.gitignore don't wanna check in IDE preferences 2016-06-26 15:03:35 -04:00
buffer.php lots of changes, added smoothing, added many parameters, fixed grid 2016-06-27 22:35:32 -04:00
index.php enhanced README, fixed Dash chart to match new options 2016-06-28 00:14:21 -04:00
LICENSE.txt This matters 2016-06-26 14:46:21 -04:00
README.md enhanced README, fixed Dash chart to match new options 2016-06-28 00:14:21 -04:00
SVGChartBuilder.php avoid coalesce operator 2016-06-28 00:17:49 -04:00
test-stockMarket.php switched to an options array 2016-06-28 00:05:26 -04:00
test-temperature.php switched to an options array 2016-06-28 00:05:26 -04:00
Util.php separated SVG generation from demo file 2016-06-26 16:59:39 -04:00

Dash-SVG-chart

PHP project to generate cached SVG price charts

Dash 24h price in BTC from Poloniex

Requirements

  • PHP

Installation

Extract the files from https://github.com/seigler/Dash-SVG-chart/archive/master.zip where you want to use the chart, or from the command line run git clone "https://github.com/seigler/Dash-SVG-chart" . in the folder where you want the charts served from.

Usage

In your PHP file:

Header('Content-type: image/svg+xml; charset=utf-8');
Header('Content-Disposition: inline; filename="Dash-24h-chart-' . date('Y-m-d\THisT') . '.svg"');
include 'buffer.php';
include 'SVGChartBuilder.php';

/* your code here to generate $chartData */

print SVGChartBuilder::renderStockChart($chartData, [
  'width'=>800,
  'height'=>250,
  'lineColor'=>"#1C75BC",
  'labelColor'=>"#777",
  'smoothed'=>false
]);

In your HTML: <img src="path to the PHP file">

Credits