npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-topicmapper

v0.0.15

Published

A D3 based Topic mapper chart

Downloads

31

Readme

ngx-topicmapper

This is a component to integrate D3 based MC-Topicmapper plugin into your Angular app.

Installation

npm install [email protected]  ngx-topicmapper --save 
npm install @types/[email protected] --save-dev (For d3 types: based on D3 version)

Configuration

Ensure you import the module and the dependencies:

import { NgxTopicmapperModule } from 'ngx-topicmapper';

@NgModule({
   imports: [
       NgxTopicmapperModule,
       ...OtherModules
   ] // along with your other modules
})
export class AppModule {}

In your component:

  • Add to the html:
<lib-ngx-topicmapper id="mcGalaxychart" height="800" [treeData]="data" [loader]="boolPreloader" 
(exportClicked)="onExportClicked($event)" (legendClicked)="onlegendClicked($event)" (nodeClicked)="onNodeClicked($event)" ></lib-ngx-topicmapper> 
  • Add to the typescript:

export class MyComponent {
  data: any = {};
  boolPreloader: boolean = false;

  ...
  constructor() {
  }

 onExportClicked() {
   console.log("Export clicked")
 }

 onlegendClicked() {
   console.log("Legend clicked")
 }

 nodeClicked(data) {
   console.log("noded clicked", data)
 }

Attributes

It can contain the following properties.

Input

| Option | Default | Type | Description | | :------------ | :------------ | :----- | :--------- | | id | mcTopicMapperChart | String | (OPIONAL) Unique Id of the chart. | | height | 700 | Number | (OPIONAL) Height of the SVG (default 700px), lower heights may have overlapping issue. Width is dynamic based on parent container. | | treeData | Not set | Object | As specified | | loader | False | Boolean | Loader Animation when data is loading via API |

Output

| Option |Description | | :------------ |:--------- | | nodeClicked | When nodes in graph are clicked, output event will be triggered with clicked node details. | | exportClicked | When export button on Chart is clicked | | legendClicked | When legend button on Chart is clicked |

Changelog

Version ngx-topicmapper 0.0.1

  • Compatabile with D3 version 7.3
  • First version with loader, data inputs.
  • Outputs: nodeClicked

Version ngx-topicmapper 0.0.4

  • Compatabile with D3 version 4.13
  • Height Input added.
  • Export, Legend click outputs added.
  • Special class for pagination nodes (class: pageNode)
  • Inline styles for Lines connecting nodes.
  • Export/Legend Ux based on mockups.

Version ngx-topicmapper 0.0.5

  • Compatabile with D3 version 4.13
  • Compatabile for smaller sceen sizes (mobile).

Version ngx-topicmapper 0.0.6

  • Compatabile with D3 version 4.13
  • Zoom control style fixes.
  • Inner container style fix "max-height:700px".
  • Font family updated to 'Lato'

Version ngx-topicmapper 0.0.8

  • Compatabile with D3 version 4.13
  • Default zoom reduced in first time mobile view.
  • Portrait landscape reload.
  • Central text allignment

Version ngx-topicmapper 0.0.9

  • Compatabile with D3 version 4.13
  • Central text count added.

Version ngx-topicmapper 0.0.10

  • Compatabile with D3 version 4.13
  • Responsive vertical allignment of zoom controls in mobile screens.

Version ngx-topicmapper 0.0.11

  • Compatabile with D3 version 7.6
  • Compatabile with Angular 12, 13 and typescript >4.5.0
  • All the other features of older topic mapper versions.

Version ngx-topicmapper 0.0.12 - 0.0.13

  • Compatabile with D3 version 7.6
  • Compatabile with Angular 10, 11 and typescript >4.2.0
  • All the other features of older topic mapper versions.

Version ngx-topicmapper 0.0.14

  • Compatabile with D3 version 7.6
  • Compatabile with Angular 14 and typescript >4.5.0
  • All the other features of older topic mapper versions.

Version ngx-topicmapper 0.0.15

  • Compatabile with D3 version 7.8.5
  • Compatabile with Angular 16 and typescript >5.1.3
  • All the other features of older topic mapper versions.