diff --git a/demo-as-image.php b/demo-as-image.php index 6c200b5..6f4e65e 100644 --- a/demo-as-image.php +++ b/demo-as-image.php @@ -12,7 +12,6 @@ for ($n = 0, $current = $offset + 0.5 * $scale; $n < 24; $n++) { $chartData[$n] = $current; } -header('Content-type: image/svg+xml; charset=utf-8'); $chart = new NeatCharts\LineChart($chartData, [ 'width'=>500, 'height'=>400, @@ -21,5 +20,8 @@ $chart = new NeatCharts\LineChart($chartData, [ 'smoothed'=>false, 'fontSize'=>14 ]); + +header('Content-type: image/svg+xml; charset=utf-8'); +echo '' . PHP_EOL; echo $chart->render(); ?> diff --git a/src/NeatCharts/LineChart.php b/src/NeatCharts/LineChart.php index ec474a1..840c091 100644 --- a/src/NeatCharts/LineChart.php +++ b/src/NeatCharts/LineChart.php @@ -175,7 +175,7 @@ namespace NeatCharts { - + '.( $this->options['yAxisEnabled'] || $this->options['xAxisEnabled'] ? ' '.( $gridText ).' - + ' : '').'