Setting Options Locally - Description

In this example, we set options locally

Live Example

Initialization Code

			<script>
				
				$("#kitbox").kitbox({
					kitboxType: "kitboxSeries",
					dataType: "json",
					url: "/pages/series/setting_remote_options.php",
					header: {text: "Setting Options Remotely"}
				});
				
			</script>
		

PHP Random Data Series Generator With Options

			<?php
			
				$data = array( "data" => array(), "xaxis" => array());
				$number = 30;
				
				for( $x = 0; $x < $number / 5; $x++ ){
					$slice = array();
						
					for( $y = 0; $y < $number; $y++ )
						array_push( $slice, mt_rand( mt_rand(1,49) * ($x + 1), mt_rand(50,100) * ($x + 1) ) );
						
					array_push($data['data'], 
						array( 
							"data" => $slice, 
							"label" => "Series: " . $x,
							"show" => true, 		
							"bars" => array(
								"show" => false,	
								"barWidth" => 0.8,	
								"fill" => true
							),
							"lines" => array(
								"show" => true,
								"lineWidth" => 2,
								"fill" => true,
								"steps" => true
							),
							"stack" => true
						)
					);
				}
				
				for( $x = 0; $x < $number; $x++ )
					array_push($data['xaxis'],  "Element: " . $x );
				
				echo json_encode( $data );
				
			?>