Share 10+ visual chart libraries to help you easily create beautiful large visual screens

foreword

d21efd659c7778ae413a39e5109d4927.png

Visual charts are often involved in the process of developing visualization projects. Many cool reports and large screens we see use a lot of charts. Next, I will share with you some popular open source and free chart libraries.

Source: Fun talk front-end public account

github: https://github.com/MrXujiang

1.D3.js

f8325900c503cd9148c4de74a5ee63a6.png

D3Full name (Data-Driven Documents), a data-driven chart library. JavaScriptDeveloped by , it can greatly reduce our workload, especially in data D3visualization. It can simplify the complex steps of generating visualization to a few simple functions. We only need to input a few simple data to convert to various A gorgeous graphic.

Next, let's take a look at a case of using it to implement a histogram:

2d79d7fe231393408c080b796fe51826.png

code show as below:

chart = BarChart(alphabet, {
  x: d => d.letter,
  y: d => d.frequency,
  xDomain: d3.groupSort(alphabet, ([d]) => -d.frequency, d => d.letter), // sort by descending frequency
  yFormat: "%",
  yLabel: "↑ Frequency",
  width,
  height: 500,
  color: "steelblue"
})

We can implement a simple chart very efficiently, and we can also use to D3implement a complex visual chart:

fad4969188dab76d734c12e53860d322.png

If you are interested, you can refer to it.

github address : https://github.com/d3/d3

2. ApexCharts

f5ed72362411b49e452df0a585f07ded.png

ApexChartsis a neat SVGcharting library with Vueand Reactwrappers . It works very silky-smoothly on different devices and comes with detailed documentation. ApexChartsis an MIT-licensed open source project that can be used in commercial and non-commercial projects.

Next, share some of the charts it provides:

2c0ecdbc2e3517fb43d5f3d1378b8a0c.png

Analysis Radar:

54b47cf3e14c01858959623d01d8ff7c.png

Statistical Analysis:

e8df8120572b3bdd071f1d96608c82a3.png

At present, mainstream frameworks such as vue, angular, reactand so on are supported, and the versatility is still very good. If you are interested, you can refer to it.

github address : https://gitee.com/mirrors/ApexChartsJS

3. Chart.js

f01d6743329896bafc27ee718ad67f17.png

Chart.jsis a very popular open source library with more than 60,000+ GitHubon star. Flexible and lightweight, allowing us to build responsive charts using HTML5 Canvasthe element . Line charts and bar charts can be easily mixed and matched to combine different data sets for very interesting features, support vueand react.

Next, let's look at the configuration that uses it:

const config = {
  type: 'bar',
  data: data,
  options: {
    responsive: true,
    plugins: {
      legend: {
        position: 'top',
      },
      title: {
        display: true,
        text: 'Chart.js Bar Chart'
      }
    }
  },
};

Line chart example:

4723f5edca5a54a9c5a3c4f79febf407.png

Radar chart:

7196c829626a573e60ea1b313770b3e3.png

If you are interested, you can refer to it.

github address : https://github.com/chartjs/Chart.js

4. AntV

d9a4034ca8ea285f6aade4668ea0dd25.png

AntVThe design principles of data visualization are Ant Designderived from the design system and have the guiding principles of data visualization characteristics. While adhering to Ant Designthe design further interprets the field of data visualization, such as color palettes and font guidelines.

AntVAfter a lot of actual project experience, four core principles are summarized: accuracy, clarity, effectiveness, and beauty. These four principles are sorted in order of importance, complement each other and present a progressive relationship.

f152cb936fa7acd23b5e80d191bce39f.png

Let's take a look at the chart examples it provides:

9df343d8ec8c0aefe7f19137e6314d12.png

If you are interested, you can refer to it.

github address : https://github.com/antvis

5. Echarts

72742870a34694b67717e31b80c12b45.png

Apache EChartsIt is an open source visual chart library JavaScriptbased , which has many built-in visual chart libraries, including commonly used column charts, pie charts, line charts, etc., as well as a lot of 3D components, as follows:

41914bfdf70cdd3d6ac1ae20f1779c6a.png 3a02d27e38ae623aa167b17dd1b884e1.png

If you are interested, you can refer to it.

github address : https://github.com/apache/echarts

6. Level

63219c90b03bd0a25c3bd0bfe9a581e3.png

Nivois D3a Reactbeautiful visual chart framework based on and , providing fourteen different types of components to present chart data.

NivoMany customization options and three rendering options are available: Canvas, SVG, and even based APIon HTML. It's very well documented, Democonfigurable and a lot of fun. This is a high-level library that is very easy to use. Next, share a few chart examples:

3a42d2979ea720f62bb5cc9c5331726b.png

Code example:

import { ResponsiveBar } from '@nivo/bar'

const MyResponsiveBar = ({ data /* see data tab */ }) => (
    <ResponsiveBar
        data={data}
        keys={[
            'hot dog',
            'burger',
            'sandwich',
            'kebab',
            'fries',
            'donut'
        ]}
        indexBy="country"
        margin={
    
    { top: 50, right: 130, bottom: 50, left: 60 }}
        padding={0.3}
        valueScale={
    
    { type: 'linear' }}
        indexScale={
    
    { type: 'band', round: true }}
        colors={
    
    { scheme: 'nivo' }}
        borderColor={
    
    {
            from: 'color',
            modifiers: [
                [
                    'darker',
                    1.6
                ]
            ]
        }}
        axisTop={null}
        axisRight={null}
        axisBottom={
    
    {
            legend: 'country',
            legendPosition: 'middle',
            legendOffset: 32
        }}
        axisLeft={
    
    {
            tickSize: 5,
            tickPadding: 5,
            tickRotation: 0,
            legend: 'food',
            legendPosition: 'middle',
            legendOffset: -40
        }}
        labelSkipWidth={12}
        labelSkipHeight={12}
        labelTextColor={
    
    {
            from: 'color',
            modifiers: [
                [
                    'darker',
                    1.6
                ]
            ]
        }}
        role="application"
        ariaLabel="Nivo bar chart demo"
        barAriaLabel={function(e){return e.id+": "+e.formattedValue+" in country: "+e.indexValue}}
    />
)

If you are interested, you can refer to it.

github address : https://github.com/plouc/nivo

7. dygraphs

c7e70b3ac0d7ec9a55bc9580944ffa38.png

Dygraphsis an open source JSlibrary ; used to generate user-interactive, zoomable time charts. It is mainly used to display dense data collections, and users can browse and view data well.

Next, share a few chart examples:

39f9fcc239d25168ed5e082d21e0a82a.png 5edc4e09df1eb34ac696214e5d3ae6bd.png

If you are interested, you can refer to it.

github address : https://github.com/danvk/dygraphs

8. Protovis

569de0386248f6e044c23c0383bce34e.png

ProtovisIt is a visual javaScriptchart generation tool, the case is as follows:

73e44eda90d882af2c9a0494c9742ccf.png

Bubble chart:

31314233acac967e9ccc89c8dceb7f7c.png

Code example:

/* Sizing and scales. */
var w = 400,
    h = 250,
    x = pv.Scale.linear(0, 1.1).range(0, w),
    y = pv.Scale.ordinal(pv.range(10)).splitBanded(0, h, 4/5);

/* The root panel. */
var vis = new pv.Panel()
    .width(w)
    .height(h)
    .bottom(20)
    .left(20)
    .right(10)
    .top(5);

/* The bars. */
var bar = vis.add(pv.Bar)
    .data(data)
    .top(function() y(this.index))
    .height(y.range().band)
    .left(0)
    .width(x);

/* The value label. */
bar.anchor("right").add(pv.Label)
    .textStyle("white")
    .text(function(d) d.toFixed(1));

/* The variable label. */
bar.anchor("left").add(pv.Label)
    .textMargin(5)
    .textAlign("right")
    .text(function() "ABCDEFGHIJK".charAt(this.index));

/* X-axis ticks. */
vis.add(pv.Rule)
    .data(x.ticks(5))
    .left(x)
    .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
  .add(pv.Rule)
    .bottom(0)
    .height(5)
    .strokeStyle("#000")
  .anchor("bottom").add(pv.Label)
    .text(x.tickFormat);

vis.render();

If you are interested, you can refer to it.

github address : https://github.com/protovis

9. Recharts

dba0ce98cb6a9ae5bc4b5e8b030172db.png

RechartsThe meaning is to redefine (Redefined) chart. The reason behind this name is that the design of this chart brings a different experience to developers, not only in Reactdesign , but also in redefining the way of combination and configuration. Next, let's take a look at the chart examples it provides:

6c0a7cfe92a75942bb0b6e647379712f.png

We can see that it is reactwritten , and the writing method is very simple.

If you are interested, you can refer to it.

github address : https://github.com/recharts/recharts

10. hitting charts

a4eb2b656683287998a55fa92e9adc0e.png

Frappe ChartsIt is a free, open-source, lightweight and non-dependent webchart library, simple and not bloated, and supports Vue / Reactthe use of frameworks such as collocation. Next, I will share a few chart examples with you:

pie chart:

8d9fdff9a9133d053ed4a9ff8ac685bb.png

percentage:

d056c5c74bc71bd18c5ead49ce60b552.png

Heat map:

d006da90a47b4f0b1812deaf0c257637.png

Two-column chart:

85175fbaff64c306993f7db21461fcbd.png

If you are interested, you can refer to it.

github address : https://github.com/frappe/charts


The above is the whole content of this sharing, I hope it will be helpful to you ^_^

If you like it, don't forget to share, like, and bookmark three times~.

70fd0f777388577c1e8d1c130d72f008.gif

Build a full-stack visual large-screen production platform V6.Dooring from scratch

Build an engine from zero design visualization large screen

Analysis of Data Source Design of Dooring Visual Construction Platform

Some thinking and practice of visual construction

Develop a full-stack document editor from scratch based on Koa + React + TS (advanced practice

Click to see you look the best

Guess you like

Origin blog.csdn.net/KlausLily/article/details/129679616