Use Highcharts to generate line chart _ at last, highcharts_at
// Read the database data, convert the data format after reading the data, and configure the highchart data source. Anyway, finally opened, haha!
Database Connection: conn_orcale.php
<? Php $ dbconn = oci_connect ("dnc-local", "dnc-local", "orcl") or die ("database connection error");?>
Read data: device_query.php
<?php require 'conn_orcale.php'; $sql = "select * from xiaolv_month"; $query = oci_parse($dbconn,$sql); oci_execute($query); <span style="color:#ff0000;">while( $a = oci_fetch_array($query)) { $b[] = intval($a[1]); } $data= json_encode($b);</span> oci_close($dbconn);?>
Or
<?php require 'conn_orcale.php'; $sql = "select month,xiaolv from xiaolv_month"; $query = oci_parse($dbconn,$sql); <span style="color:#ff0000;">$b=array(); while( $a = oci_fetch_array($query)) { array_push($b,intval($a[1])); } echo json_encode($b);</span> oci_close($dbconn);?>
Use Highcharts to generate a line chart: Test. php
<?php require 'device_query.php';?>
Positive energy, with images and truth.
How can I create a line chart with multiple lines in highcharts?
1. There are multiple lines and only one line is displayed. The other lines are not currently displayed. The instance code is as follows:
2. Draw only one line, and draw other lines with functions.
The function for adding a line is addSeries (). For details, see the API documentation.
How to write and query data in AspNet and bind the case code to Highcharts (line chart)
Why not use Microsoft's MSCHAT? MSCHAT supports multiple data sources and Multiple display methods.