Anonymous Anonymous - 2 months ago
615 0

No description

PHP

skin.php

<?php
session_start();
$skin = array(
	'name' => $_SESSION['skinCond'],
	'data' => $_SESSION['scores'],
)
?>

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<script>
	//var skinCond = '<? echo $_SESSION['skinCond']; ?>';
	//var skinScore = '<? echo $_SESSION['scores']; ?>';
	Highcharts.chart('container', {
		chart: {
			type: 'column'
		},
		title: {
			text: 'Skin Severity Level '
		},
		subtitle: {
			text: ''
		},
		xAxis: {
			categories: [
				''
			],
			crosshair: true
		},
		yAxis: {
			min: 0,
			title: {
				text: 'Level of Skin Condition'
			}
		},
		tooltip: {
			headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
			pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
			'<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
			footerFormat: '</table>',
			shared: true,
			useHTML: true
		},
		plotOptions: {
			column: {
				pointPadding: 0.1,
				borderWidth: 0
			}
		},
		series: [<?php
			echo json_encode( $skin );
			?>]
	});
</script>