From 3c781af3122f92967af0e14dd032567175231fd3 Mon Sep 17 00:00:00 2001 From: slruslan Date: Tue, 15 Sep 2015 17:16:00 +0700 Subject: [PATCH] Update README.md --- README.md | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 923bd0c..14e3e64 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +![PHP Waveform2PNG Library](examples/bars_example.png) PHP Waveform2PNG Library === @@ -32,10 +33,15 @@ Original code by [Andrew Freiday](http://andrewfreiday.com). - Change the settings (or leave them default): > $graph->setHeight(200); +> > $graph->setWidth(1200); +> > $graph->setBackground(''); +> > $graph->setForeground('#35cc32'); +> > $graph->setDetail(20); +> > $graph->setType('waveform'); - Load your file and process it: @@ -46,6 +52,16 @@ Original code by [Andrew Freiday](http://andrewfreiday.com). > $graph->saveImage('waveform_example.png'); // Saves image to file > $graph->outputImage(); // Outputs image to browser +### Available graph types + +##### Waveform: + +![Waveform graph](examples/waveform_example.png) + +##### Bars: + +![Bars graph](examples/bars_example.png) + ### Image generation options Main settings are specified with methods @@ -57,6 +73,9 @@ Main settings are specified with methods - setDefail($amount) - Sets detalization level to $amount. (The lower the number, the less data points are skipped, thus resulting in higher detail waveform); - setType($type) - Sets graph type to $type; + +### Multicolor graph + There is also a method to create graph with different color regions: - addColor($timeMin, $timeMax, $color) - Sets color of graph to $color on region from $timeMin to $timeMax secs. Example: @@ -64,16 +83,6 @@ There is also a method to create graph with different color regions: ![Multicolor graph](examples/multicolor_example.png) -### Available graph types - -##### Waveform: - -![Waveform graph](examples/waveform_example.png) - -##### Bars: - -![Bars graph](examples/bars_example.png) - ### Other notes Library is currently under development. @@ -82,4 +91,4 @@ Feel free to submit your suggestions and use issue tracker if you've found a bug ### License -Please see the LICENSE file. \ No newline at end of file +Please see the LICENSE file.