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

@sgratzl/chartjs-chart-boxplot

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sgratzl/chartjs-chart-boxplot - npm Package Compare versions

Comparing version 4.0.0-alpha to 4.0.0

20

build/index.d.ts

@@ -8,3 +8,3 @@ /**

import { TooltipModel, Element, BarController, Scale, ChartMeta, UpdateMode, ControllerDatasetOptions, ScriptableAndArrayOptions as ScriptableAndArrayOptions$1, CommonHoverOptions as CommonHoverOptions$1, AnimationOptions, Chart, ChartItem, ChartConfiguration } from 'chart.js';
import { TooltipModel, Element, ChartType, ScriptableAndArrayOptions, CommonHoverOptions, ScriptableContext, BarController, Scale, ChartMeta, UpdateMode, CartesianScaleTypeRegistry, ControllerDatasetOptions, AnimationOptions, Chart, ChartItem, ChartConfiguration } from 'chart.js';

@@ -166,3 +166,3 @@ interface ExtendedTooltip extends TooltipModel<'boxplot' | 'violin'> {

}
declare type QuantileMethod = 7 | 'quantiles' | 'hinges' | 'fivenum' | 'linear' | 'lower' | 'higher' | 'nearest' | 'midpoint' | ((arr: ArrayLike<number>, length?: number | undefined) => {
type QuantileMethod = 7 | 'quantiles' | 'hinges' | 'fivenum' | 'linear' | 'lower' | 'higher' | 'nearest' | 'midpoint' | ((arr: ArrayLike<number>, length?: number | undefined) => {
q1: number;

@@ -178,3 +178,3 @@ median: number;

}
declare type IBoxplotOptions = IBaseOptions;
type IBoxplotOptions = IBaseOptions;
interface IViolinOptions extends IBaseOptions {

@@ -184,3 +184,3 @@ points: number;

declare type IViolinElementOptions = IStatsBaseOptions;
type IViolinElementOptions = IStatsBaseOptions;
interface IViolinElementProps extends IStatsBaseProps {

@@ -261,5 +261,5 @@ min: number;

}
interface BoxPlotControllerDatasetOptions extends ControllerDatasetOptions, IBoxplotOptions, ScriptableAndArrayOptions$1<IBoxAndWhiskersOptions, 'boxplot'>, ScriptableAndArrayOptions$1<CommonHoverOptions$1, 'boxplot'>, AnimationOptions<'boxplot'> {
interface BoxPlotControllerDatasetOptions extends ControllerDatasetOptions, IBoxplotOptions, ScriptableAndArrayOptions<IBoxAndWhiskersOptions, ScriptableContext<'boxplot'>>, ScriptableAndArrayOptions<CommonHoverOptions, ScriptableContext<'boxplot'>>, AnimationOptions<'boxplot'> {
}
declare type BoxPlotDataPoint = number[] | (Partial<IBoxPlot> & IBaseStats);
type BoxPlotDataPoint = number[] | (Partial<IBoxPlot> & IBaseStats);
interface IBoxPlotChartOptions {

@@ -274,3 +274,3 @@ }

scales: keyof CartesianScaleTypeRegistry;
metaExtensions: Record<string, never>;
metaExtensions: {};
parsedDataType: IBoxPlot & ChartTypeRegistry['bar']['parsedDataType'];

@@ -292,4 +292,4 @@ };

}
declare type ViolinDataPoint = number[] | (Partial<IViolin> & IBaseStats);
interface ViolinControllerDatasetOptions extends ControllerDatasetOptions, IViolinOptions, ScriptableAndArrayOptions$1<IViolinElementOptions, 'violin'>, ScriptableAndArrayOptions$1<CommonHoverOptions$1, 'violin'>, AnimationOptions<'violin'> {
type ViolinDataPoint = number[] | (Partial<IViolin> & IBaseStats);
interface ViolinControllerDatasetOptions extends ControllerDatasetOptions, IViolinOptions, ScriptableAndArrayOptions<IViolinElementOptions, ScriptableContext<'violin'>>, ScriptableAndArrayOptions<CommonHoverOptions, ScriptableContext<'violin'>>, AnimationOptions<'violin'> {
}

@@ -305,3 +305,3 @@ interface IViolinChartOptions {

scales: keyof CartesianScaleTypeRegistry;
metaExtensions: Record<string, never>;
metaExtensions: {};
parsedDataType: IViolin & ChartTypeRegistry['bar']['parsedDataType'];

@@ -308,0 +308,0 @@ };

@@ -10,3 +10,3 @@ /**

import { drawPoint, formatNumber, merge } from 'chart.js/helpers';
import boxplots, { quantilesType7, quantilesHinges, quantilesFivenum, quantilesLinear, quantilesLower, quantilesHigher, quantilesNearest, quantilesMidpoint } from '@sgratzl/boxplots';
import { quantilesType7, boxplot, quantilesHinges, quantilesFivenum, quantilesLinear, quantilesLower, quantilesHigher, quantilesNearest, quantilesMidpoint } from '@sgratzl/boxplots';

@@ -70,3 +70,3 @@ function whiskers(boxplot, arr, coef = 1.5) {

function boxplotStats(arr, options) {
const r = boxplots(arr, determineStatsOptions(options));
const r = boxplot(arr, determineStatsOptions(options));
return {

@@ -101,3 +101,3 @@ items: Array.from(r.items),

}
const stats = boxplots(arr, determineStatsOptions(options));
const stats = boxplot(arr, determineStatsOptions(options));
const samples = computeSamples(stats.min, stats.max, options.points);

@@ -104,0 +104,0 @@ const coords = samples.map((v) => ({ v, estimate: stats.kde(v) }));

{
"name": "@sgratzl/chartjs-chart-boxplot",
"description": "Chart.js module for charting boxplots and violin charts",
"version": "4.0.0-alpha",
"version": "4.0.0",
"publishConfig": {

@@ -64,3 +64,3 @@ "access": "public"

"peerDependencies": {
"chart.js": "^3.9.1"
"chart.js": "^4.0.1"
},

@@ -73,6 +73,7 @@ "browserslist": [

"dependencies": {
"@kurkle/color": "^0.2.1",
"@sgratzl/boxplots": "^1.3.0"
},
"devDependencies": {
"@chiogen/rollup-plugin-terser": "^7.0.2",
"@chiogen/rollup-plugin-terser": "^7.1.3",
"@rollup/plugin-commonjs": "^23.0.2",

@@ -82,12 +83,12 @@ "@rollup/plugin-node-resolve": "^15.0.1",

"@rollup/plugin-typescript": "^9.0.2",
"@types/jest": "^29.2.2",
"@types/jest": "^29.2.3",
"@types/jest-image-snapshot": "^5.1.0",
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"@typescript-eslint/eslint-plugin": "^5.44.0",
"@typescript-eslint/parser": "^5.44.0",
"@yarnpkg/sdks": "^2.6.3",
"canvas": "^2.10.2",
"canvas-5-polyfill": "^0.1.5",
"chart.js": "^3.9.1",
"eslint": "^8.27.0",
"chart.js": "^4.0.1",
"eslint": "^8.28.0",
"eslint-config-airbnb-typescript": "^17.0.0",

@@ -100,10 +101,10 @@ "eslint-config-prettier": "^8.5.0",

"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-image-snapshot": "^6.0.0",
"prettier": "^2.7.1",
"prettier": "^2.8.0",
"rimraf": "^3.0.2",
"rollup": "^3.2.5",
"rollup": "^3.4.0",
"rollup-plugin-cleanup": "^3.2.1",

@@ -113,4 +114,4 @@ "rollup-plugin-dts": "^5.0.0",

"tslib": "^2.4.1",
"typedoc": "^0.23.20",
"typescript": "^4.8.4"
"typedoc": "^0.23.21",
"typescript": "^4.9.3"
},

@@ -123,3 +124,3 @@ "scripts": {

"build": "rollup -c",
"test": "jest --passWithNoTests --detectOpenHandles --forceExit",
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --passWithNoTests --detectOpenHandles --forceExit",
"test:watch": "yarn run test --watch",

@@ -137,3 +138,8 @@ "test:coverage": "yarn run test --coverage",

},
"packageManager": "yarn@3.2.4"
"packageManager": "yarn@3.3.0",
"dependenciesMeta": {
"chart.js@4.0.1": {
"unplugged": true
}
}
}

@@ -30,3 +30,3 @@ # Chart.js Box and Violin Plot

see [Samples](https://github.com/sgratzl/chartjs-chart-box-and-violin-plot/tree/master/samples) on Github
see [Samples](https://github.com/sgratzl/chartjs-chart-box-and-violin-plot/tree/main/samples) on Github

@@ -33,0 +33,0 @@ and [![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/QxoLoY)

@@ -1,2 +0,12 @@

import { registry, BarController, LineController, PointElement, BarElement, LineElement } from 'chart.js';
import {
registry,
BarController,
LineController,
PointElement,
BarElement,
LineElement,
CategoryScale,
LinearScale,
LogarithmicScale,
} from 'chart.js';
import createChart from '../__tests__/createChart';

@@ -24,2 +34,3 @@ import { BoxPlotController, BoxPlotDataPoint } from './BoxPlotController';

registry.addElements(BoxAndWiskers, PointElement, BarElement, LineElement);
registry.addScales(CategoryScale, LinearScale, LogarithmicScale);
});

@@ -26,0 +37,0 @@

@@ -12,2 +12,4 @@ import {

AnimationOptions,
ScriptableContext,
CartesianScaleTypeRegistry,
} from 'chart.js';

@@ -61,4 +63,4 @@ import { merge } from 'chart.js/helpers';

IBoxplotOptions,
ScriptableAndArrayOptions<IBoxAndWhiskersOptions, 'boxplot'>,
ScriptableAndArrayOptions<CommonHoverOptions, 'boxplot'>,
ScriptableAndArrayOptions<IBoxAndWhiskersOptions, ScriptableContext<'boxplot'>>,
ScriptableAndArrayOptions<CommonHoverOptions, ScriptableContext<'boxplot'>>,
AnimationOptions<'boxplot'> {}

@@ -78,3 +80,3 @@

scales: keyof CartesianScaleTypeRegistry;
metaExtensions: Record<string, never>;
metaExtensions: {};
parsedDataType: IBoxPlot & ChartTypeRegistry['bar']['parsedDataType'];

@@ -81,0 +83,0 @@ };

@@ -1,2 +0,2 @@

import { registry } from 'chart.js';
import { CategoryScale, LinearScale, registry } from 'chart.js';
import createChart from '../__tests__/createChart';

@@ -11,2 +11,3 @@ import { ViolinController } from './ViolinController';

registry.addElements(Violin);
registry.addScales(CategoryScale, LinearScale);
});

@@ -13,0 +14,0 @@ test('default', () => {

@@ -12,2 +12,4 @@ import {

AnimationOptions,
ScriptableContext,
CartesianScaleTypeRegistry,
} from 'chart.js';

@@ -70,4 +72,4 @@ import { merge } from 'chart.js/helpers';

IViolinOptions,
ScriptableAndArrayOptions<IViolinElementOptions, 'violin'>,
ScriptableAndArrayOptions<CommonHoverOptions, 'violin'>,
ScriptableAndArrayOptions<IViolinElementOptions, ScriptableContext<'violin'>>,
ScriptableAndArrayOptions<CommonHoverOptions, ScriptableContext<'violin'>>,
AnimationOptions<'violin'> {}

@@ -85,3 +87,3 @@

scales: keyof CartesianScaleTypeRegistry;
metaExtensions: Record<string, never>;
metaExtensions: {};
parsedDataType: IViolin & ChartTypeRegistry['bar']['parsedDataType'];

@@ -88,0 +90,0 @@ };

@@ -1,2 +0,3 @@

import boxplots, {
import {
boxplot as boxplots,
quantilesFivenum,

@@ -3,0 +4,0 @@ quantilesHigher,

@@ -1,2 +0,2 @@

import { BarElement } from 'chart.js';
import { BarElement, ChartType, CommonHoverOptions, ScriptableAndArrayOptions, ScriptableContext } from 'chart.js';
import { StatsBase, baseDefaults, baseOptionKeys, baseRoutes, IStatsBaseOptions, IStatsBaseProps } from './base';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import { BarElement } from 'chart.js';
import { BarElement, ChartType, CommonHoverOptions, ScriptableAndArrayOptions, ScriptableContext } from 'chart.js';
import { drawPoint } from 'chart.js/helpers';

@@ -3,0 +3,0 @@ import type { IKDEPoint } from '../data';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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