From 7701635a6c0031390399d1a79f3ee53cd1c9ad81 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Sun, 3 Jul 2016 03:44:10 -0400 Subject: [PATCH] added a parameter for setting the marker color --- demo.php | 20 +++++++++++++++++++- src/NeatCharts/LineChart.php | 2 +- src/NeatCharts/NeatChart.php | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/demo.php b/demo.php index 408cbc7..c15afc9 100644 --- a/demo.php +++ b/demo.php @@ -51,6 +51,23 @@ $chart = new NeatCharts\LineChart(randomData(), [ 'fontSize'=>14 ]); echo $chart->render(); +?> +
Random generated data, loaded right in the page
+ + +
+

Smoothed SVG chart in svg tag

+
+ 300, + 'height'=>300, + 'lineColor'=>'#080', + 'labelColor'=>'#222', + 'smoothed'=>true, + 'fontSize'=>14 +]); +echo $chart->render(); ?>
Random generated data, loaded right in the page
@@ -63,8 +80,9 @@ $chart = new NeatCharts\LineChart(randomData(48), [ 'width'=>100, 'height'=>20, 'lineColor'=>'#000', + 'markerColor'=>'#F00', 'smoothed'=>false, - 'fontSize'=>2, + 'fontSize'=>4, 'yAxisEnabled'=>false, 'xAxisEnabled'=>false ]); diff --git a/src/NeatCharts/LineChart.php b/src/NeatCharts/LineChart.php index 840c091..019aba0 100644 --- a/src/NeatCharts/LineChart.php +++ b/src/NeatCharts/LineChart.php @@ -167,7 +167,7 @@ namespace NeatCharts { $this->output = ' - + diff --git a/src/NeatCharts/NeatChart.php b/src/NeatCharts/NeatChart.php index fd46984..bb442b3 100644 --- a/src/NeatCharts/NeatChart.php +++ b/src/NeatCharts/NeatChart.php @@ -5,6 +5,7 @@ namespace NeatCharts { 'width' => 800, 'height' => 250, 'lineColor' => '#000', + 'markerColor' => '#000', 'labelColor' => '#000', 'smoothed' => false, 'fontSize' => 15,