An open source visual chart library based on JavaScript

An open source visual chart library based on JavaScript

2022-09-16 0 444
Resource Number 38595 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This issue recommends Apache ECharts, an open source javascript-based visual chart library.

An open source visual chart library based on JavaScript插图

ECharts is an open source visual library implemented by JavaScript, which can run smoothly on PC and mobile devices and is compatible with most current browsers (IE9/10/11, Chrome, Firefox, Safari, etc.). The underlying dependency on the vector graphics library ZRender provides intuitive, interactive, and highly customizable data visualizations.

Feature

Rich chart types: Provides more than 20 charts and a dozen components out of the box, and supports any combination of charts and components.

Powerful rendering engine: one-click switch between Canvas and SVG twin engines, incremental rendering, stream loading and other technologies to achieve smooth interaction of tens of millions of data.

Professional data analysis: Manage data through data sets, support data filtering, clustering and regression, and help realize multi-dimensional analysis of the same data.

Elegant visual design: The default design follows visual principles, supports responsive design, and provides flexible configuration items for developers to customize.

Healthy open source community: Active community users ensure the healthy development of the project, and also contribute a wealth of third-party plug-ins to meet the needs of different scenarios.

Friendly accessibility: intelligently generated chart descriptions and decals to help visually impaired people understand the chart content and read the story behind the chart.

Mobile terminal optimization: ECharts has made detailed optimization for mobile terminal interaction, for example, it is suitable for finger scaling and translation in coordinate system on small screen of mobile terminal.

Get Started

1 Obtain Apache ECharts

Apache ECharts supports a variety of download methods, you can choose any of the following methods to install according to the actual situation of the project.

  • Obtained from GitHub:

The release page of the apache/echarts project will find links to each version. Click Source code in Assets at the bottom of the download page, and echarts.js in dist directory after decompression is a file containing complete ECharts functions.

https://github.com/apache/echarts/releases
  • From NPM:
npm install echarts --save
  • From the CDN:

https://www.jsdelivr.com/package/npm/echarts select dist/echarts js, click and save as echarts. Js file.

2 Importing Apache ECharts

Create an index.html file in the directory where you just saved echarts.js with the following content:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <!-- Import the ECharts file you just downloaded -->
    <script src="echarts.js"></script>
  </head>
</html>

Open this index.html and you’ll see a blank space. But don’t worry, open the console to make sure there are no error messages, and you can proceed to the next step.

3 Draw a simple chart

Before drawing we need to prepare a DOM container with defined height and width for ECharts. In the example just now. /head>  After that, add:

<body>
  <!-- 为 ECharts Get one that defines the width and heightDOM -->
  <div id="main" style="width: 600px;height:400px;"></div>
</body>

Then you can initialize an echarts instance with the echarts.init method and generate a simple bar graph with the setOption method. Here is the complete code:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>ECharts</title>
    < ! -- Import the ECharts file you just downloaded --> 
    <script src="echarts.js"></script>
  </head>
  <body>
    <!-- 为 ECharts Get one that defines the width and height DOM -->
    <div id="main" style="width: 600px;height:400px;"></div>
    <script type="text/javascript">
      // Initializes the echarts instance based on the prepared dom 
      var myChart = echarts.init(document.getElementById('main'));

      // Specify configuration items and data for the chart 
      var option = {
        title: {
          text: 'EChartsGetting started example'
        },
        tooltip: {},
        legend: {
          data: ['Sales']
        },
        xAxis: {
          data:  [< span class = "HLJS - string" > 'shirt < / span >, < span class = "HLJS - string" >' sweaters' < / span >, < span class = "HLJS - string" > 'snow spins unlined upper garment' < / span >, < span class = "HLJS - string" > 'pants' < / span >, < span class = "HLJS - string" >' high heels' < / span >, < span class = "HLJS - string" > < / span > 'socks']
        },
        yAxis: {},
        series: [
          {
            name: 'Sales',
            type: 'bar',
            data: [5, 20, 36, 10, 10, 20]
          }
        ]
      };

      // Display the chart using the configuration items and data just specified. 
      myChart.setOption(option);
    </script>
  </body>
</html>

So your first chart is born!

An open source visual chart library based on JavaScript插图1

Chart example

Line chart

An open source visual chart library based on JavaScript插图2

Line chart stack

An open source visual chart library based on JavaScript插图3

Stack area map

An open source visual chart library based on JavaScript插图4

Gradient stack area map

An open source visual chart library based on JavaScript插图5

Beijing AQI visualization

Bar chart

An open source visual chart library based on JavaScript插图6

Stacked bar graph

An open source visual chart library based on JavaScript插图7

Multi-y axis

An open source visual chart library based on JavaScript插图8

Stacked bar graph

Pie chart

An open source visual chart library based on JavaScript插图9

Nightingale rose

An open source visual chart library based on JavaScript插图10

Nested ring graph

Geographical coordinates/map

An open source visual chart library based on JavaScript插图11

Histogram animation

Diagram

An open source visual chart library based on JavaScript插图12

Character diagram (circular layout)

An open source visual chart library based on JavaScript插图13

NPM dependency graph

Rectangular tree

An open source visual chart library based on JavaScript插图14

Disk usage

Rising Sun graph

An open source visual chart library based on JavaScript插图15

Drink Flavors

Parallel coordinate system

An open source visual chart library based on JavaScript插图16

AQI distribution (parallel)

An open source visual chart library based on JavaScript插图17

Nutrient structure (parallel coordinates)

An open source visual chart library based on JavaScript插图18

Scatter matrix and parallel coordinates

—END—

Component preview address:
https://echarts.apache.org/examples/zh/index.html

Open Source protocol: Apache2.0

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code An open source visual chart library based on JavaScript https://ictcoder.com/kyym/an-open-source-visual-chart-library-based-on-javascript.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service