Create a simple visual JavaScript interactive chart block diagram

dhtmlxDiagram is a chart library that can generate any chart you need with just a few lines of code. Visualize complex data in a neat hierarchical structure with automatic layout and real-time graph editor. JavaScript dhtmlxDiagram allows you to add beautiful interactive diagrams, charts and graphs to web applications. With this lightweight and fast component, your data will be presented in a clear and intuitive way.

Click to download the trial version of dhtmlxDiagram

When looking for the right tools to visualize systems and concepts, don’t forget the simple and effective decision-making provided by JavaScript block diagrams. This type of diagram helps to quickly illustrate the main parts of a related system or topic. You can download the chart library with this chart type and other chart types for a 30-day trial.

Create a simple visual JavaScript interactive chart block diagram
Block diagrams are usually used to briefly describe the system, process, or concept in the early stages of work. They are widely used in applied sciences such as engineering science, electronics, and computers to create project drafts, general descriptions of systems, programs, and software applications. In order to avoid distracting the core elements and provide an overview of the entire system, details are omitted from the block diagram. In the future, such diagrams may be elaborated or divided into several diagrams to assist in the further design process.
In addition, you may find it useful to rely on JavaScript block diagrams as a way to sketch ideas, project steps, or certain points.

Drawing block diagram

All elements of the block diagram play an equal role in visualization. They are represented by similar rectangles and are usually regarded as "black boxes".

Create a simple visual JavaScript interactive chart block diagram

Understanding that these elements themselves have nothing to do with the process of creating block diagrams, but more importantly their interconnection. There may be no hierarchy in the block diagram, and their elements may be organized in closed loops.

The arrows indicate the flow of data from one block to another and indicate how the graph should be read. To make it clearer, you can provide a title next to the shape to add a brief description.
Create a simple visual JavaScript interactive chart block diagram

Use DHTMLX to build JavaScript block diagrams

JavaScript block diagram and organization chart, workflow diagram, decision tree, UML diagram and other diagram types are included in the DHTMLX diagram library. Thanks to the rich API, extensive browser support, and various simple implementations, all these diagrams can be easily integrated into the application framework and technology. The data can be loaded into the js block diagram in JSON format (please view the document here).

The flexibility of customization options allows you to build the block diagram from scratch in exactly the way you want, and improve its appearance and style to meet all the requirements of the project. The complete list of object properties for shapes and connectors is here. Our CSS style guide will help you determine the appearance of the chart. In addition, there are many different operations that allow you to manipulate the shape of the graph-add new shapes, delete old shapes, update the content of shapes, filter shapes, and do nothing else.

Let's take a closer look at how to configure JavaScript block diagrams through CSS and object properties of shapes and connectors:

<style>
        html,body,.cont{
            background: #FFF;
        }
        .dhx_diagram{
            background: #FFF;
        }
        .dhx_free_diagram .dhx_item_shape{
            fill: #A4E5D9;
            stroke:none;
        }
        .dhx_free_diagram .dhx_diagram_flow_item text{
            font-size: 16px;
        }
        .dhx_free_diagram .dhx_item_text{
            font-size: 16px;
        }
        #dhx_text_background feFlood{
            flood-color: #FFF;
        }
        .dhx_free_diagram .dhx_item_text{
            filter:url(#dhx_text_background);
            fill:#000;
        }
        .dhx_free_diagram .dhx_diagram_line{
            stroke: #7FBBB0;
        }
        .dhx_free_diagram .dhx_diagram_arrow{
            stroke:#7FBBB0;
            fill:#7FBBB0;
        }
        .titles .dhx_item_shape{
            fill:#FFF;
        }
    </style>
var dataPlanning = [
    { "id": 1, "x": 200, "y": 0, "text": "Arrival", "type": "process" },
    { "id": 2, "x": 200, "y": 130, "text": "Load", "type": "process" },
    { "id": 2.1, "x": 480, "y": 130, "text": "Part", "type": "process" },
    { "id": 3, "x": 200, "y": 260, "text": "Process Plan", "type": "process" },
    { "id": 3.1, "x": 0, "y": 240, "text": "Unit Load", "type": "process" },
...
    { "id": 19, "x": 270, "y": 500, "text": "Allocates", "type": "text" },
    { "id": 20, "x": 390, "y": 555, "text": "Works on", "type": "text" },
    { "id": 21, "x": 270, "y": 630, "text": "Is a", "type": "text" },
    { "id": 22, "x": 940, "y": 790, "text": "Connected through", "type": "text" },
...
    { from: 2, to: 2.1, type: "line", backArrow:"filled" },
    { from: 2, to: 3.1, type: "line", forwardArrow: "filled" , toSide: "top" },
    { from: 3, to: 4, type: "line", forwardArrow: "filled"  },
    { from: 4, to: 5, type: "line", forwardArrow: "filled"  },
    { from: 5, to: 5.1, type: "line", forwardArrow: "filled" , toSide: "bottom" },
    { from: 5, to: 5.2, type: "line", forwardArrow: "filled" , toSide: "bottom" },
    { from: 5, to: 5.3, type: "line", forwardArrow: "filled" , toSide: "bottom" },
    { from: 5, to: 5.4, type: "line", forwardArrow: "filled" , toSide: "bottom" },
...
    { from: 5, to: 10, type: "line", forwardArrow: "filled" , fromSide: "bottom", toSide: "top" },
    { from: 5, to: 11, type: "line", forwardArrow: "filled" , fromSide: "bottom", toSide: "top" },
    { from: 5, to: 12, type: "line", forwardArrow: "filled" , fromSide: "bottom", toSide: "top" },
    { from: 5, to: 13, type: "line", forwardArrow: "filled" , fromSide: "bottom", toSide: "top" },
]

The dhtmlxDiagram library not only provides developers with a special diagram editor, but also provides space for end users to customize diagrams. It is easy to initialize and can be used as an application to create charts from scratch without writing code, customize their appearance, save changes and view them instantly.
After designing the block diagram, please save it by exporting to PDF or PNG format.

in conclusion

Block diagrams have added various JavaScript diagram types to our library and provide you with the advantages of a simple and effective method that can be used to quickly and routinely visualize systems and concepts, create drafts and sketches, and create clear and compact Ways to record ideas.

The DHTMLX chart library provides you with a powerful tool that can be used to build highly customizable JavaScript block diagrams and integrate them into any project. Our 30-day trial version allows you to test all the features of the library and provide support to our development team during the evaluation period.

APS helps improve the production efficiency of enterprises, truly realize the visual presentation and control of production plans, quickly and effectively respond to production plans in different scenarios, improve on-time delivery capabilities, and increase production capacity and resource utilization.

If you want to purchase a genuine dhtmlxDiagram license, or understand the Huidu APS system, please click [Consult Online Customer Service]

This article is reproduced from [Huidu Technology] evget welcomes any form of reprinting, but please be sure to indicate the source, do not modify the relevant links of the original text, and respect the achievements of others

Guess you like

Origin blog.51cto.com/14874181/2548244