Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@steelbreeze/landscape

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@steelbreeze/landscape

Landscape map viewpoint visualisation

  • 3.9.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by350%
Maintainers
1
Weekly downloads
 
Created
Source

landscape

Maintainability

Landscape map visualisation of data.

landscape map viewpoint

This library produces visualisations of data that conform to the Archimate Landscape Map Viewpoint.

The tool takes as an input a cube of data generated by @steelbreeze/pivot along with the axes used to create it. It generates the layout, first creating duplicate rows or columns where there is more than one value in a cell and then merging adjacent cells on the x and/or y axes.

The final render operation is left to the user, using the tools and techniques of your choice. The returned data structure is a jagged array with values for cols and rows denoting how many column and rows the cell spans.

These visualisations are an invaluable communication tool offering insight into the health of a portfolio.

If you like @steelbreeze/landscape, please star it.

Installation

NPM

To install from npm:

npm install @steelbreeze/landscape

Web

For web via a CDN:

import * as pivot from 'https://cdn.skypack.dev/@steelbreeze/landscape@3.2?min';

Dependencies

@steelbreeze/landscape is dependant on @steelbreeze/pivot, also installable via npm or skypack. The @steelbreeze/landscape API requires cubes and dimensions generated by @steelbreeze/pivot.

Example

This simple example is taken from the steelbreeze.net homepage:

// create pre-defined dimensions
const axes = {
	x: ["Rates", "FX", "MM", "Credit", "Equities"].map(landscape.criteria("Product")),
	y: ["Market gateway", "Order execution", "Order management", "Confirmations"].map(landscape.criteria("Capability"))
};

// pivot the data using the product and capability dimensions as the x and y axes respectively
const cube = pivot.cube(data, axes.y, axes.x);

// create a table of data from the pivot cube
const table = landscape.table(cube, axes, key, true);

// merge cells on both axes where possible
landscape.merge(table, true, true);

// render the table in the target element
document.getElementById('tablan').replaceWith(render.table(table, 'tablan', 'landscape'));

...

// create text and style to be used when rendering the table
function key(record) {
	return { text: record.Name, style: record.Status };
}

Note that while the key function must comply with the Key interface, specifing values for text and style, other properties can be added and these will be available at the time of rendering. When merging adjacent cells, in the merge function, only text and style are compared.

Usage

The full API documentation can be found here.

License

MIT License

Copyright (c) 2022 David Mesquita-Morris.

Keywords

FAQs

Package last updated on 18 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc