<commit_before># Dash-SVG-chart
PHP project to generate cached SVG price charts

![Dash 24h price in BTC from Poloniex](http://cryptohistory.org/dash/24h/)

## 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="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

* PHP output buffering based on http://www.the-art-of-web.com/php/buffer/
* Chart appearance based on advice found at http://vis4.net/blog/posts/doing-the-line-charts-right/<commit_msg>made example save-as filename more generic<commit_after># Dash-SVG-chart
PHP project to generate cached SVG price charts

![Dash 24h price in BTC from Poloniex](http://cryptohistory.org/dash/24h/)

## 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 '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

* PHP output buffering based on http://www.the-art-of-web.com/php/buffer/
* Chart appearance based on advice found at http://vis4.net/blog/posts/doing-the-line-charts-right/
{'fraction_non_alphanumeric': 0.156786941580756, 'fraction_numerical': 0.01632302405498282, 'mean_word_length': 4.585131894484412, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '585539', 'n_tokens_mistral': 831, 'n_tokens_neox': 785, 'n_words': 216}