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-khiops-histogram

v0.0.1

Published

```ngx-khiops-histogram``` is an Angular Typescript component that allows you to display histograms of numerical values in linear and logarithmic form. This component is maintained and is integrated into the [Khiops Visualization](https://github.com/Khio

Downloads

4

Readme

ngx-khiops-histogram

ngx-khiops-histogram is an Angular Typescript component that allows you to display histograms of numerical values in linear and logarithmic form. This component is maintained and is integrated into the Khiops Visualization tool.

Why ?

If the linear representation in x and y is classic, as is the logarithmic representation in y, the logarithmic representation in x poses a problem for values ​​around zero and for negative interval values.

Negative logarithmic values

Negative logarithmic interval values ​​cannot be represented since Math.log10(-x) = NaN. In order to represent these values, ​​we will take their absolute values ​​which we will display on the negative axis of x: from -1 to -inf

image

Values around 0

Values ​​around [-1; 1] are infinite so the representation should be infinitely large. To avoid this, we then arbitrarily assign a width of 1/10 of the width of the graph.

image

If 0 is a bound, the arbitrary histogram in the middle is divided into two parts to represent the value <0 and the value >0

image

Installation

yarn add ngx-khiops-histogram

or

npm install ngx-khiops-histogram

Usage

Add wanted package to NgModule imports:

import { NgxKhiopsHistogramModule } from 'ngx-khiops-histogram';

@NgModule({
...
imports: [NgxKhiopsHistogramModule,...]
...
})

Add component to your page:

<ngx-khiops-histogram
    [datas]="datas"
    [datasLabels]="datasLabels"
    [options]="options"
    [graphOptionX]="graphOptionX"
    [graphOptionY]="graphOptionY"
    (selectedItemChanged)="selectedItemChanged($event)">
</ngx-khiops-histogram>

Params

| Property | Type | Default | Description | |--|--|--|--| | graphOptionX | HistogramType | HistogramType.XLIN | X axis scale | | graphOptionY| HistogramType | HistogramType.YLIN| Y axis scale | | options| HistogramOptions| {selectedBarColor: 'black',gridColor: '#aaa',xPadding: 40,yPadding: 50,minBarHeight: 4} | Optional styles options | | datas| HistogramData| {frequency: number,partition: [number, number],value: number,logValue: number} | Datas inputs |

Outputs

| Property | Event type | Description| |--|--|--| | selectedItemChanged | EventEmitter(Number) | Emit new index value when a bar is clicked|

License

This software is distributed under the BSD 3-Clause-clear License, the text of which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or see the LICENSE.md for more details.

Credits

The ngx-khiops-histogram library is currently developed at Orange Innovation by the Khiops Team: [email protected].