Giter Site home page Giter Site logo

elfsquad / third-party-visualization Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 34 KB

A package to implement third party visualization in your custom interface.

Home Page: https://docs.elfsquad.io/docs/configurator/libraries/elfsquad-third-party-visualization-library

License: MIT License

Makefile 0.91% TypeScript 99.09%

third-party-visualization's Introduction

๐Ÿ“Š Elfsquad Third Party Visualization

๐ŸŒ Overview

The Elfsquad third party visualization package provides a simple way to implement third party visualization in your custom interface.

An example implementation can be found in the docs directory. This is also hosted at https://elfsquad.github.io/third-party-visualization/.

๐Ÿ›  Installation

To install the package, run the following command:

npm install --save @elfsquad/third-party-visualization

or include the following script tag in your HTML file:

<script type="importmap>
{
  "imports": {
    "@elfsquad/third-party-visualization": "https://cdn.skypack.dev/@elfsquad/[email protected]"
  }
}
</script>

๐Ÿ–ฅ๏ธ Usage

This package exposes the VisualizationFrame class. This class can be used for creating & communicating with the iframe.

Example:

import { VisualizationFrame } from "@elfsquad/third-party-visualization";
const container = document.createElement("div");
document.body.appendChild(container);

const elfsquad = new VisualizationFrame({
  container: container,
  url: "https://elfsquad.github.io/third-party-visualization-test/"
});

๐Ÿ“ Examples

Send Configuration Updates

Trigger an update in the third party visualization.

visualization.sendConfigurationUpdated(new Configuration());

Update Requirement

Update a single requirement.

visualization.onUpdateRequirement(data => {
  console.log('Requirement updated:', data);
});

Update Multiple Requirements

Update multiple requirements at once.

visualization.onUpdateRequirements(data => {
  console.log('Multiple requirements updated:', data);
});

Update Image Value

Update the image value of a node.

visualization.onUpdateImageValue(data => {
  console.log('Image value updated:', data);
});

Update Text Value

Update the text value of a node.

visualization.onUpdateTextValue(data => {
  console.log('Text value updated:', data);
});

๐Ÿค Contributing

We welcome contributions! Please feel free to fork the repository, make your changes, and submit a pull request.

โš–๏ธ License

Licensed under MIT. See the LICENSE file in the repository for full details.

๐ŸŽ‰ Acknowledgements

A big thank you to everyone who contributes to the ongoing development and maintenance of this package.

third-party-visualization's People

Contributors

stanvanrooy avatar johannesheesterman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.