PointlineJS

PointlineJS is an SVG based JS library for drawing tree diagrams. It relies on Treant-JS, Raphael for handling SVG and animations, JQuery.

Installation

You can get the latest release and the type definitions using npm:

npm install pointlinejs --save

Quick start

1. Import in your project PointlineJS:

          
            import { PointlineJS } from "pointlinejs";
            const simple_chart_config = {
              chart: {
                  container: "#tree-simple"
              },

              nodeStructure: {
                  text: { name: "Parent node" },
                  children: [
                      {
                          text: { name: "First child" }
                      },
                      {
                          text: { name: "Second child" }
                      }
                  ]
              }
            };
            const test = new PointlineJS(simple_chart_config);
            test.getTree();
            test.draw();
          
        

2. Add div in your html. Example based on index.html:

          
            <!DOCTYPE html>
            <html>
              <head>
                <meta charset="utf-8" />
                <title>PointlineJS Example</title>
              </head>
              <body>
                  <div id="tree-simple" style="height: 600px; width: 900px"></div>
              </body>
            </html>
          
        

Examples

  1. Basic example
    Organizational chart of the company structure along with pictures and basic information about each member.
  2. Collapsable
    Here is an example that shows how to make an interactive, collapsible chart.
  3. Comments
    Treant can be SEO friendly. This example shows how a static HTML can be used for node content.
  4. Connectors
    Using vendor/raphael.js as a SVG drawing library, all types and styles for connectors are possible.
  5. Custom color plus scrollbar
    Root node can be positioned in all four mayor directions. A scrollbar is only displayed where needed.
  6. Custom colored
    This is a demo displaying how the use of colors can represent each department in the company structure. It is simple and easy to understand. Anyone could easily visualize their departments in this type of chart.
  7. Evolution tree
    This is a very simple and effective representation of an evolution branch. It shows the use of scroller
  8. No parent
    Root nodes are optional and can easily be omitted.
  9. Simple scrollbar
    When having trouble with a big and more complex chart, a good looking scrollbar can be used to access hidden content.
  10. Super simple
    An extra simple example. Just to get you started.
  11. Tennis draw
    Tennis results are displayed in a classic tree structure. Tree structure is an adequate method of representation for any type of bracketed events.
  12. Test ground
    Test multiple tree on one page
  13. Timeline
    An interactive timeline can be made.

Support

If you are experience any kind of issues we will be happy to help. You can report an issue using the issues page

If you want to share your thoughts with the development team or join us you will be able to check issues or create pull request.

License

License License under the MIT License (MIT) Copyright © 2023 - 2025 Egor Fedoseev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.