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 🙏

© 2026 – Pkg Stats / Ryan Hefner

khiops-visualization

v11.14.6

Published

Khiops Visualization is a powerful visualization plugin for the data preparation and scoring tool Khiops. It provides intuitive visualizations of analysis results, enabling quick and easy interpretation of discovered patterns in your data.

Readme

Khiops Visualization & Covisualization Components

npm version License

Khiops Visualization is a powerful visualization plugin for the data preparation and scoring tool Khiops. It provides intuitive visualizations of analysis results, enabling quick and easy interpretation of discovered patterns in your data.

⚡ Installation

Latest version:

npm i khiops-visualization@latest

Or specific version:

npm i [email protected]

🚀 Usage

🅰️ With Angular

Into your html app file:

<khiops-visualization></khiops-visualization>

or

<khiops-covisualization></khiops-covisualization>

Into your .ts app component:

import { Component, ElementRef, ViewChild } from '@angular/core';
import 'khiops-visualization';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  standalone: false,
  styleUrl: './app.component.scss',
})
export class AppComponent {
  jsonData = {}; // JSON data to be displayed

  @ViewChild('visualizationComponent', {
    static: false,
  })
  visualizationComponent?: ElementRef<HTMLElement>;

  @ViewChild('covisualizationComponent', {
    static: false,
  })
  covisualizationComponent?: ElementRef<HTMLElement>;

  ngOnInit(): void {
    this.visualizationComponent?.nativeElement.setConfig({
      showProjectTab: false,
      showLogo: false,
      // ... see Configuration
    });
    this.visualizationComponent?.nativeElement.setDatas(jsonData);

    this.covisualizationComponent?.nativeElement.setConfig({
      showProjectTab: false,
      showLogo: false,
      // ... see Configuration
    });
    this.covisualizationComponent?.nativeElement.setDatas(jsonData);
  }
}

You may have to allow CUSTOM_ELEMENTS_SCHEMA into your module:

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, AppRoutingModule, FormsModule],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  bootstrap: [AppComponent],
})

🌐 Without Angular (Vanilla JavaScript)

You can also use the library in any HTML application without Angular. Here's a complete example:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Khiops Visualization</title>
    <style>
      html,
      body {
        margin: 0;
        padding: 0;
        height: 100%;
        width: 100%;
      }
    </style>
  </head>
  <body>
    <khiops-visualization id="kv1" style="width: 100%; height: 100%"></khiops-visualization>

    <!-- Include the library from CDN -->
    <script src="https://unpkg.com/khiops-visualization/khiops-webcomponents.bundle.js"></script>

    <script>
      document.addEventListener('DOMContentLoaded', function () {
        // Get the component element
        const kv1 = document.querySelector('khiops-visualization');

        // Wait for the component to be fully initialized
        if (kv1 && typeof kv1.clean === 'function') {
          initializeComponent();
        } else {
          setTimeout(() => {
            initializeComponent();
          }, 500);
        }
      });

      function initializeComponent() {
        const kv1 = document.querySelector('khiops-visualization');

        // Clean any previous data
        kv1.clean();

        // Set configuration
        kv1.setConfig({
          showProjectTab: false,
          showLogo: false,
          showOpenFileBtn: true,
        });

        // Load and set your JSON data
        loadData().then((data) => {
          kv1.setDatas(data);
        });
      }

      async function loadData() {
        // Example: load data from a JSON file
        try {
          const response = await fetch('./your-data.json');
          return await response.json();
        } catch (error) {
          console.error('Error loading data:', error);
          return {}; // Return empty object as fallback
        }
      }
    </script>
  </body>
</html>

For covisualization, simply replace <khiops-visualization> with <khiops-covisualization> in the HTML.

⚙️ Configuration

The components can be customized using the setConfig() method with the following options:

| Option | Type | Description | Default | | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | showProjectTab | boolean | Show or hide project's tab | true | | showLogo | boolean | Show or hide header's logo | true | | selectTabName | string | Select the active tab on load. Accepted values for visualization: PREPARATION, TEXT_PREPARATION, TREE_PREPARATION, PREPARATION_2D, MODELING, EVALUATION, PROJECT. Accepted values for covisualization: AXIS, CONTEXT, PROJECT | | | appSource | string | Specify app source for metrics | WEB | | trackerId | string | Matomo tracker id | | | onFileOpen | Callback | Callback when a file is open | | | onCopyData | Callback | Callback when datas are copied | | | onCopyImage | Callback | Callback when screenshot is copied | | | onSendEvent | Callback | Send custom events Event must have a message and may have additionnal datas of any type | | | readLocalFile | Callback | Callback when a local file is loaded automatically. For security reasons, local files can not be loaded automatically without Electron.Used to load external datas at startup.This method takes a file in input and a callback when file is loaded | |

📋 Data Models

The components expect specific data structures. TypeScript interfaces are available for reference:

💡 Tip: Use these TypeScript interfaces in your project for better type safety and IntelliSense support.

🔧 API Methods

The components provide several methods for interaction:

| Method | Description | Example | | ------------------- | -------------------------------------- | ---------------------------------------- | | setDatas(data) | Load visualization data | component.setDatas(jsonData) | | setConfig(config) | Set component configuration | component.setConfig({showLogo: false}) | | clean() | Clear current data and reset component | component.clean() |

📄 License

Khiops visualization & covisualization webcomponents is available under the BSD 3-Clause Clear License.