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

@datagrok-libraries/statistics

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datagrok-libraries/statistics - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

13

CHANGELOG.md
# statistics changelog
## 1.2.5 (2023-08-25)
### Features
* [#2101](https://github.com/datagrok-ai/public/issues/2101): Added lineStyle to the IFitSeriesOptions interface
* [#2106](https://github.com/datagrok-ai/public/issues/2106): Added code comments about line style
### Bug Fixes
* [#2101](https://github.com/datagrok-ai/public/issues/2101): Improved curves properties and rendering:
* Fixed the curve fitting algorithm
* Fixed axes scales
## 1.2.4 (2023-08-23)

@@ -4,0 +17,0 @@

2

package.json

@@ -7,3 +7,3 @@ {

"friendlyName": "statistics",
"version": "1.2.4",
"version": "1.2.5",
"description": "",

@@ -10,0 +10,0 @@ "dependencies": {

@@ -72,2 +72,3 @@ import { Property } from 'datagrok-api/src/entities';

export declare type FitMarkerType = 'asterisk' | 'circle' | 'cross border' | 'diamond' | 'square' | 'star' | 'triangle bottom' | 'triangle left' | 'triangle right' | 'triangle top';
export declare type FitLineStyle = 'solid' | 'dotted' | 'dashed' | 'dashdotted';
/** A point in the fit series. Only x and y are required. Can override some fields defined in IFitSeriesOptions. */

@@ -127,2 +128,3 @@ export interface IFitPoint {

markerType?: FitMarkerType;
lineStyle?: FitLineStyle;
pointColor?: string;

@@ -129,0 +131,0 @@ fitLineColor?: string;

@@ -37,2 +37,53 @@ /* eslint-disable valid-jsdoc */

}
/** Returns median points from within multiple points with the same x. */
function getMedianPoints(data) {
const medianPoints = { x: [], y: [] };
const currentPoints = { x: [data.x[0]], y: [data.y[0]] };
for (let i = 1; i < data.x.length; i++) {
if (data.x[i] === currentPoints.x[0]) {
currentPoints.x[currentPoints.x.length] = data.x[i];
currentPoints.y[currentPoints.y.length] = data.y[i];
continue;
}
const mid = Math.floor(currentPoints.y.length / 2);
const sortedPoints = currentPoints.y.sort((a, b) => a - b);
const median = sortedPoints.length % 2 === 0 ? (sortedPoints[mid - 1] + sortedPoints[mid]) / 2 : sortedPoints[mid];
medianPoints.x[medianPoints.x.length] = currentPoints.x[0];
medianPoints.y[medianPoints.y.length] = median;
currentPoints.x = [data.x[i]];
currentPoints.y = [data.y[i]];
}
return medianPoints;
}
/** Returns logarithmic IC50 parameter bounds. */
function logIC50ParameterBounds(ic50Bounds) {
if (ic50Bounds) {
if (ic50Bounds.max !== undefined)
ic50Bounds.max = Math.log10(ic50Bounds.max);
if (ic50Bounds.min !== undefined) {
ic50Bounds.min = ic50Bounds.min === 0 ?
-Number.MAX_VALUE : Math.log10(ic50Bounds.min);
}
}
return ic50Bounds;
}
function changeBounds(bounds, chartOptions) {
let x = bounds.x;
let y = bounds.y;
let width = bounds.width;
let height = bounds.height;
if (chartOptions.minX !== undefined && chartOptions.minX > 0) {
width += x - chartOptions.minX;
x = chartOptions.minX;
}
if (chartOptions.maxX !== undefined && chartOptions.maxX > 0)
width += chartOptions.maxX - (x + width);
if (chartOptions.minY !== undefined) {
height += y - chartOptions.minY;
y = chartOptions.minY;
}
if (chartOptions.maxY !== undefined)
height += chartOptions.maxY - (y + height);
return new DG.Rect(x, y, width, height);
}
/** Returns the bounds of an {@link IFitChartData} object */

@@ -42,4 +93,2 @@ export function getChartBounds(chartData) {

const o = chartData.chartOptions;
if ((o === null || o === void 0 ? void 0 : o.minX) && o.minY && o.maxX && o.maxY)
return new DG.Rect(o.minX, o.minY, o.maxX - o.minX, o.maxY - o.minY);
if (!((_a = chartData.series) === null || _a === void 0 ? void 0 : _a.length) || chartData.series.length === 0)

@@ -54,3 +103,3 @@ return new DG.Rect(0, 0, 1, 1);

}
return bounds;
return o ? changeBounds(bounds, o) : bounds;
}

@@ -70,3 +119,5 @@ }

y: series.points.filter((p) => !p.outlier).map((p) => (logOptions === null || logOptions === void 0 ? void 0 : logOptions.logY) ? Math.log10(p.y) : p.y) };
return fitData(data, fitFunc, FitErrorModel.Constant, series.parameterBounds);
if (series.parameterBounds && (logOptions === null || logOptions === void 0 ? void 0 : logOptions.logX))
series.parameterBounds[2] = logIC50ParameterBounds(series.parameterBounds[2]);
return fitData(getMedianPoints(data), fitFunc, FitErrorModel.Constant, series.parameterBounds);
}

@@ -90,2 +141,2 @@ /** Returns series confidence interval functions */

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml0LWRhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmaXQtZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnQ0FBZ0M7QUFDaEMsT0FBTyxLQUFLLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV0QyxPQUFPLEVBQ0wsYUFBYSxFQUNiLE9BQU8sRUFDUCwyQkFBMkIsRUFDM0IsYUFBYSxFQUViLGNBQWMsRUFJZCxzQkFBc0IsRUFJdEIsbUJBQW1CLEVBQ25CLHNCQUFzQixFQUN0QixPQUFPLEdBQ1IsTUFBTSxhQUFhLENBQUM7QUFRckIsaUZBQWlGO0FBQ2pGLFNBQVMsb0JBQW9CLENBQUMsVUFBeUI7SUFDckQsTUFBTSxDQUFDLEdBQVEsRUFBRSxDQUFDO0lBQ2xCLEtBQUssTUFBTSxDQUFDLElBQUksVUFBVSxFQUFFO1FBQzFCLElBQUksQ0FBQyxDQUFDLFlBQVksS0FBSyxJQUFJO1lBQ3pCLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLFlBQVksQ0FBQztLQUM5QjtJQUNELE9BQU8sQ0FBQyxDQUFDO0FBQ1gsQ0FBQztBQUVELHFIQUFxSDtBQUNySCxtREFBbUQ7QUFDbkQsTUFBTSxVQUFVLHNCQUFzQjtJQUNwQyxPQUFPO1FBQ0wsWUFBWSxFQUFFLG9CQUFvQix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wKChwKSA9PiBwLngpLFxuICAgIHk6IHNlcmllcy5wb2ludHMuZmlsdGVyKChwKSA9PiAhcC5vdXRsaWVyKS5tYXAoKHApID0+IHAueSl9O1xuICBpZiAoIXNlcmllcy5wYXJhbWV0ZXJzKVxuICAgIHNlcmllcy5wYXJhbWV0ZXJzID0gZml0U2VyaWVzKHNlcmllcywgZml0RnVuYykucGFyYW1ldGVycztcbiAgcmV0dXJuIGdldFN0YXRpc3RpY3MoZGF0YSwgc2VyaWVzLnBhcmFtZXRlcnMsIGZpdEZ1bmMueSwgdHJ1ZSk7XG59XG4iXX0=

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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