|
![](/images/resource/spacer.gif) |
|
สอบถามเกี่ยวกับการสร้างกราฟจากฐานข้อมูลหน่อยครับ ใข้ highchart น่ะครับ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
![ฟ ฟ](https://www.thaicreate.com/upload/stock/20160721151745.png?v=1001)
ผมต้องการเปลี่ยนตัวเลขของเดือนให้กลายเป็นเดือนภาษาไทยครับ
เก็บมาเป็น array ครับ
Code (JavaScript)
$(document).ready(function(){
var chart1 = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line'
},
title: {
text: ''
},
xAxis: {
title: {
text: '<b>เดือน</b>'
},
categories: [<?php echo join($search_service_y, ',') ?>],
},
yAxis: {
title: {
text: '<b>ส่วนลด (บาท)<b>'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br/> เดือน '+
this.x +' : '+ this.y +' ฿';
},
crosshairs : true
},
credits: {
enabled: false
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: true
}
},
series: [{
name: 'ส่วนลดจากการขาย',
data: [<?php echo join($search_sale_x, ',') ?>]
}, {
name: 'ส่วนลดจากงานบริการ',
data: [<?php echo join($search_service_x, ',') ?>]
}]
});
});
Tag : PHP, MySQL, HTML/CSS, JavaScript, Ajax, jQuery
![](/images/adv.jpg?v=1001)
|
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2016-07-21 15:19:41 |
By :
kikeeza01 |
View :
1368 |
Reply :
1 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
อาจจะต้องสร้าง Function ใน JavaScript สำหรับการแปลงเป็นเดือนภาษาไทยครับ
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2016-07-26 10:20:50 |
By :
mr.win |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 01
|