Use Highcharts to generate line chart _ at last, highcharts_at

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.