mirror of
https://github.com/seigler/neat-charts
synced 2025-07-26 17:06:09 +00:00
added xml tag to img tag charts demo, cleaned up sparkline SVG
This commit is contained in:
parent
b04fc0416f
commit
b5e3ecf479
2 changed files with 5 additions and 3 deletions
|
@ -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 '<?xml version="1.0" standalone="no"?>' . PHP_EOL;
|
||||
echo $chart->render();
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue