- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Milyen házat vegyek?
- Gaming notebook topik
- Milyen billentyűzetet vegyek?
- HiFi műszaki szemmel - sztereó hangrendszerek
- Apple asztali gépek
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Azonnali VGA-s kérdések órája
- CPU léghűtés kibeszélő
Új hozzászólás Aktív témák
-
wmati
addikt
válasz
Sk8erPeter #17317 üzenetére
Itt utolsó sorban chart = new Highcharts.Chart(options); van ezzel nekem is pont ilyen de ha át írom chart = new Highcharts.StockChart(options); akkor nem értem hogy dátumot hogy lehetne jól meg jeleníteni.
-
wmati
addikt
válasz
Sk8erPeter #17314 üzenetére
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Power levels</title>
<link rel="stylesheet" type="text/css" href="./css/temperature.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var options = {
chart: {
renderTo: 'container',
type: 'spline',
marginRight: 0,
marginBottom: 150,
zoomType: 'x'
},
title: {
text: 'Telekom Power levels (vargalex)',
x: -20 //center
},
subtitle: {
text: '',
x: -20
},
xAxis: {
categories: []
},
yAxis: {
title: {
text: 'Power level (dBmV)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: "dBmV"
/*formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y;
}*/
},
legend: {
enabled: true
},
series: []
}
$.getJSON("data.php", function(json) {
options.xAxis.categories = json[0]['data'];
options.xAxis.step = 6;
options.series[0] = json[1];
options.series[1] = json[2];
options.series[2] = json[3];
options.series[3] = json[4];
options.series[4] = json[5];
options.series[5] = json[6];
options.series[6] = json[7];
options.series[7] = json[8];
options.series[8] = json[9];
options.series[9] = json[10];
options.series[10] = json[11];
options.series[11] = json[12];
chart = new Highcharts.Chart(options);
});
});
</script>
</head>
<body>
<div id="container" style="min-width: 500px; height: 600px; margin: 0 auto"></div>
</body>
</html> -
wmati
addikt
válasz
Sk8erPeter #17312 üzenetére
Ha jó sor rendben hányom össze működni is fog
[
{
"name": "D\u00e1tum",
"data": [
"2015-04-15 07:06.03"
]
},
{
"name": "Downstream channel 1",
"data": [
3.5
]
},
{
"name": "Downstream channel 2",
"data": [
3.5
]
},
{
"name": "Downstream channel 3",
"data": [
2.8
]
},
{
"name": "Downstream channel 4",
"data": [
1.2
]
},
{
"name": "Downstream channel 5",
"data": [
0.3
]
},
{
"name": "Downstream channel 6",
"data": [
0.3
]
},
{
"name": "Downstream channel 7",
"data": [
0.3
]
},
{
"name": "Downstream channel 8",
"data": [
0.3
]
},
{
"name": "Upstream channel 1",
"data": [
44
]
},
{
"name": "Upstream channel 2",
"data": [
44.4
]
},
{
"name": "Upstream channel 3",
"data": [
45.4
]
},
{
"name": "Upstream channel 4",
"data": [
0
]
}
] -
wmati
addikt
válasz
Sk8erPeter #17310 üzenetére
Van egy data.php azzal be csatlakozol sql szerverre ahonnan ki kérem adatok és átadom a Highstock- nak ahol pedig idő pontok helyén 00:00:00:001 ilyenek jelennek meg de Highcharts-al viszont minden rendben van, idő adatokat pedig linuxos gép teszi meg datatime sql oszlopba.
<?php
require_once('config.inc.php');
$sql = "select date_format(datum,'%Y-%m-%d %H:%i.%s') as utime, down_ch1, down_ch2, down_ch3, down_ch4, down_ch5, down_ch6, down_ch7, down_ch8, up_ch1, up_ch2, up_ch3, up_ch4
from power_levels
where id between '1' and '40'
order by id
limit 0,5000";
//where datum between '".date("Y-m-d H:i.s")."' and '".date("Y-m-d H:i.s",time()+24*60*60)."'
$result = $mysqli->query($sql) or die($mysqli->error);
$dates=array();
$down_ch1=array();
$down_ch2=array();
$down_ch3=array();
$down_ch4=array();
$down_ch5=array();
$down_ch6=array();
$down_ch7=array();
$down_ch8=array();
$up_ch1=array();
$up_ch2=array();
$up_ch3=array();
$up_ch4=array();
$dates['name']='Dátum';
$down_ch1['name']='Downstream channel 1';
$down_ch2['name']='Downstream channel 2';
$down_ch3['name']='Downstream channel 3';
$down_ch4['name']='Downstream channel 4';
$down_ch5['name']='Downstream channel 5';
$down_ch6['name']='Downstream channel 6';
$down_ch7['name']='Downstream channel 7';
$down_ch8['name']='Downstream channel 8';
$up_ch1['name']='Upstream channel 1';
$up_ch2['name']='Upstream channel 2';
$up_ch3['name']='Upstream channel 3';
$up_ch4['name']='Upstream channel 4';
$recordcount = 0;
while ($row = $result->fetch_assoc()) {
$dates['data'][]=$row['utime'];
$down_ch1['data'][]=$row['down_ch1'];
$down_ch2['data'][]=$row['down_ch2'];
$down_ch3['data'][]=$row['down_ch3'];
$down_ch4['data'][]=$row['down_ch4'];
$down_ch5['data'][]=$row['down_ch5'];
$down_ch6['data'][]=$row['down_ch6'];
$down_ch7['data'][]=$row['down_ch7'];
$down_ch8['data'][]=$row['down_ch8'];
$up_ch1['data'][]=$row['up_ch1'];
$up_ch2['data'][]=$row['up_ch2'];
$up_ch3['data'][]=$row['up_ch3'];
$up_ch4['data'][]=$row['up_ch4'];
$recordcount++;
}
$mysqli->close();
$datas=array();
$datas[]=$dates;
$datas[]=$down_ch1;
$datas[]=$down_ch2;
$datas[]=$down_ch3;
$datas[]=$down_ch4;
$datas[]=$down_ch5;
$datas[]=$down_ch6;
$datas[]=$down_ch7;
$datas[]=$down_ch8;
$datas[]=$up_ch1;
$datas[]=$up_ch2;
$datas[]=$up_ch3;
$datas[]=$up_ch4;
header('Content-Type: text/javascript');
echo json_encode($datas, JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT );
?> -
wmati
addikt
Új hozzászólás Aktív témák
Hirdetés
- Bomba ár! Dell Inspiron 15 5578 2in1: i7-7GEN I 16GB I 256SSD I 15,6" FHD Touch I Cam I W11 I Gari!
- LG OLED Televíziók: FRISS SZÁLLÍTMÁNY -30%
- Bomba ár! HP Elitebook 8560W - i7-2GEN I 8GB I 500GB I 15,6" FHD I Nvidia I W10 I Garancia
- 130+131+132+133 - Lenovo Legion Pro 7 (16IRX9H) - Intel Core i9-14900HX, RTX 4080
- Samsung Galaxy Watch Ultra
Állásajánlatok
Cég: Promenade Publishing House Kft.
Város: Budapest
Cég: CAMERA-PRO Hungary Kft
Város: Budapest