No description
Find a file
2016-06-29 08:31:15 -04:00
demo added composer.json, renamed library 2016-06-29 08:31:15 -04:00
src/NeatCharts added composer.json, renamed library 2016-06-29 08:31:15 -04:00
.gitignore don't wanna check in IDE preferences 2016-06-26 15:03:35 -04:00
composer.json added composer.json, renamed library 2016-06-29 08:31:15 -04:00
LICENSE.txt This matters 2016-06-26 14:46:21 -04:00
README.md added composer.json, renamed library 2016-06-29 08:31:15 -04:00

neat-charts

PHP project to generate clean-looking SVG price charts

Dash 24h price in BTC from Poloniex 24h of Dash price in Bitcoin from Poloniex.com

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:

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

/*
your code here to populate $chartData
*/

$chart = new NeatChart/LineChart($chartData, [ // all parameters optional
  'width'=>800,
  'height'=>250,
  'lineColor'=>"#1C75BC",
  'labelColor'=>"#777",
  'smoothed'=>false
]);
print $chart->render();

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

Credits