This Code just Browser share name series..
series: [{
name: 'Man',
data: <?php echo json_encode($man_array,JSON_NUMERIC_CHECK) ?>
}, {
name: 'Women',
data: <?php echo json_encode($woman_array,JSON_NUMERIC_CHECK) ?>
}, {
name: 'Kind',
data: <?php echo json_encode($kind_array,JSON_NUMERIC_CHECK) ?>
}, {
name: 'User',
data:<?php echo json_encode($user_array,JSON_NUMERIC_CHECK) ?>
}]
How can create series like series : women, series : man...help me please...
//Include Koneksi
$koneksi = mysqli_connect("localhost", "root", "", "simcard");
// $bulan = mysqli_query($koneksi, "SELECT bulan FROM penjualan WHERE tahun='2017' order by id asc");
//Membuat Query
$q=mysqli_query($koneksi, "SELECT * FROM penduduk");
$a=mysqli_query($koneksi, "SELECT * FROM card");
$man_array=array();
$woman_array=array();
$kind_array=array();
$user_array=array();
while($r=mysqli_fetch_array($q)){
$man_array[]= $r["man"];
$woman_array[]= $r["woman"];
}
while($f=mysqli_fetch_array($a)){
$kind_array[]=$f["kind"];
$user_array[]= $f["user"];
}
this one highchart code any wrong this code..?no used the color no problem.
$('#view').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Stacked column chart'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
min: 0,
title: {
text: 'Total'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
align: 'right',
x: -30,
verticalAlign: 'top',
y: 25,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false
},
tooltip: {
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
},
plotOptions: {
column: {
//stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
}
}
},
This Page View source html series.
series: [{
name: 'Man',
data: []
}, {
name: 'Women',
data: []
}, {
name: 'Kind',
data: []
}, {
name: 'User',
data:[]
}]
});
});
</div>