Use node-red to implement a large data time series line chart with data every 10 milliseconds to support abbreviation

Big data time series line chart with one data every 10 milliseconds.

Code Explanation
This code is an example of using echarts to draw dynamic data visualization charts. Here is a detailed explanation of the code:

  1. <script src="/echarts.min.js"></script>: Introduced the echarts library, you need to ensure that the file path is correct.

  2. <div id="main1" style="height: 500px; width: 800px;"></div>: Create a div element as the chart container, set its height and width to 500px and 800px.

  3. <script>...</script>: Begins a block of JavaScript code.

  4. var chartDom = document.getElementById('main1');: Obtain the element whose id is 'main1' through the getElementById method, that is, the chart container.

  5. var myChart = echarts.init(chartDom);: Call the echarts.init method to initialize the chart instance and pass the chart container to it.

  6. var option;: Define the variable option to store the configuration items of the chart.

  7. var data = []: Defines an empty array for storing the values ​​of dynamic data points.

  8. option = {...}: defines the configuration items of the chart,

Guess you like

Origin blog.csdn.net/github_35631540/article/details/131748184