Socket
Book a DemoInstallSign in
Socket

ngx-dhis2-visualization

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-dhis2-visualization

Visualization module for dhis2 applications based on angular 6

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

DHIS2 Visualization library

installation

npm install ngx-dhis2-visualization

Usage

If the module is to be imported in the app.module, then import as

import { NgxDhis2VisualizationModule } from 'ngx-dhis2-visualization';

then add this in the imports

imports: [
    ...
    NgxDhis2VisualizationModule.forRoot(),
    ...
    ]

If the module is to be imported in other modules, then add this in the imports

imports: [
    ...
    NgxDhis2VisualizationModule.forChild(),
    ...
    ]

Once imported, visualization card can be called in as

<ngx-dhis2-visualization
  [id]="'visualizationId'"
  [type]="'CHART'"
  [name]="'Visualization'"
  [visualizationLayers]="visualizationLayers"
></ngx-dhis2-visualization>

where

  • id: unique id for visualization
  • type: type of visualization eg. CHART, TABLE, MAP, INFO etc
  • name: name for visualization
  • visualizationLayers: content for the visualization, this is an array whose format is
[{
  id: string;
  analytics?: Analytics;
  dataSelections?: VisualizationDataSelection[];
  layout?: VisualizationLayout;
  metadataIdentifiers?: Array<string>;
  layerType?: string;
  config?: {[name: string]: any};
}]

where

  • Analytics has format
{
  headers?: any[];
  metaData?: any;
  rows: Array<any[]>;
}
  • VisualizationDataSelection has format
 {
   dimension: string;
   name: string;
   layout?: string;
   filter?: string;
   optionSet?: any;
   legendSet?: string;
   items: Array<{
     id: string;
     name: string;
     type: string;
   }>;
 }
  • VisualizationLayout has format
{
  rows: Array<string>;
  columns: Array<string>;
  filters: Array<string>;
  excluded?: Array<string>;
}

FAQs

Package last updated on 28 May 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.