abstract-chart
Advanced tools
Comparing version 10.0.11 to 10.0.12
@@ -1,54 +0,4 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || (function () { | ||
var ownKeys = function(o) { | ||
ownKeys = Object.getOwnPropertyNames || function (o) { | ||
var ar = []; | ||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
return ar; | ||
}; | ||
return ownKeys(o); | ||
}; | ||
return function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createLinearAxis = createLinearAxis; | ||
exports.createLogarithmicAxis = createLogarithmicAxis; | ||
exports.createDiscreteAxis = createDiscreteAxis; | ||
exports.getTicks = getTicks; | ||
exports.getLinearTicks = getLinearTicks; | ||
exports.getLogarithmicTicks = getLogarithmicTicks; | ||
exports.transformPoint = transformPoint; | ||
exports.transformValue = transformValue; | ||
exports.inverseTransformValue = inverseTransformValue; | ||
exports.axisMin = axisMin; | ||
exports.axisMax = axisMax; | ||
exports.linearTransform = linearTransform; | ||
exports.logarithmicTransform = logarithmicTransform; | ||
exports.inverseLinearTransform = inverseLinearTransform; | ||
exports.inverseLogarithmicTransform = inverseLogarithmicTransform; | ||
const AI = __importStar(require("abstract-image")); | ||
const ts_exhaustive_check_1 = require("ts-exhaustive-check"); | ||
function createLinearAxis(min, max, label, labelColor, labelRotation, tickLabelDisp, thickness, axisColor, id, noTicks) { | ||
import * as AI from "abstract-image"; | ||
import { exhaustiveCheck } from "ts-exhaustive-check"; | ||
export function createLinearAxis(min, max, label, labelColor, labelRotation, tickLabelDisp, thickness, axisColor, id, noTicks) { | ||
return { | ||
@@ -68,3 +18,3 @@ type: "linear", | ||
} | ||
function createLogarithmicAxis(min, max, label, labelColor, labelRotation, tickLabelDisp, thickness, axisColor, id, noTicks) { | ||
export function createLogarithmicAxis(min, max, label, labelColor, labelRotation, tickLabelDisp, thickness, axisColor, id, noTicks) { | ||
return { | ||
@@ -84,3 +34,3 @@ type: "logarithmic", | ||
} | ||
function createDiscreteAxis(points, label, labelColor, labelRotation, tickLabelDisp, thickness, axisColor, id, noTicks) { | ||
export function createDiscreteAxis(points, label, labelColor, labelRotation, tickLabelDisp, thickness, axisColor, id, noTicks) { | ||
return { | ||
@@ -101,3 +51,3 @@ type: "discrete", | ||
const linearPowers = [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; | ||
function getTicks(desiredTicks, axis) { | ||
export function getTicks(desiredTicks, axis) { | ||
switch (axis.type) { | ||
@@ -111,7 +61,7 @@ case "linear": | ||
default: | ||
(0, ts_exhaustive_check_1.exhaustiveCheck)(axis); | ||
exhaustiveCheck(axis); | ||
return []; | ||
} | ||
} | ||
function getLinearTicks(desiredTicks, min, max) { | ||
export function getLinearTicks(desiredTicks, min, max) { | ||
let best; | ||
@@ -140,3 +90,3 @@ for (const power of linearPowers) { | ||
]; | ||
function getLogarithmicTicks(desiredTicks, min, max) { | ||
export function getLogarithmicTicks(desiredTicks, min, max) { | ||
const minPow = Math.floor(Math.log10(min)) - 1; | ||
@@ -155,3 +105,3 @@ const maxPow = Math.ceil(Math.log10(max)) + 1; | ||
} | ||
function transformPoint(point, xMin, xMax, yMin, yMax, xAxis, yAxis) { | ||
export function transformPoint(point, xMin, xMax, yMin, yMax, xAxis, yAxis) { | ||
const x = transformValue(point.x, xMin, xMax, xAxis); | ||
@@ -161,3 +111,3 @@ const y = transformValue(point.y, yMin, yMax, yAxis); | ||
} | ||
function transformValue(value, min, max, axis) { | ||
export function transformValue(value, min, max, axis) { | ||
if (!axis) { | ||
@@ -175,7 +125,7 @@ return value; | ||
default: | ||
(0, ts_exhaustive_check_1.exhaustiveCheck)(axis); | ||
exhaustiveCheck(axis); | ||
return 0; | ||
} | ||
} | ||
function inverseTransformValue(value, min, max, axis) { | ||
export function inverseTransformValue(value, min, max, axis) { | ||
if (!axis) { | ||
@@ -193,7 +143,7 @@ return value; | ||
default: | ||
(0, ts_exhaustive_check_1.exhaustiveCheck)(axis); | ||
exhaustiveCheck(axis); | ||
return 0; | ||
} | ||
} | ||
function axisMin(axis) { | ||
export function axisMin(axis) { | ||
switch (axis.type) { | ||
@@ -206,7 +156,7 @@ case "linear": | ||
default: | ||
(0, ts_exhaustive_check_1.exhaustiveCheck)(axis); | ||
exhaustiveCheck(axis); | ||
return 0; | ||
} | ||
} | ||
function axisMax(axis) { | ||
export function axisMax(axis) { | ||
switch (axis.type) { | ||
@@ -219,10 +169,10 @@ case "linear": | ||
default: | ||
(0, ts_exhaustive_check_1.exhaustiveCheck)(axis); | ||
exhaustiveCheck(axis); | ||
return 0; | ||
} | ||
} | ||
function linearTransform(value, min, max) { | ||
export function linearTransform(value, min, max) { | ||
return (value - min) / (max - min); | ||
} | ||
function logarithmicTransform(value, min, max) { | ||
export function logarithmicTransform(value, min, max) { | ||
if (value > 0) { | ||
@@ -238,6 +188,6 @@ return (Math.log10(value) - Math.log10(min)) / (Math.log10(max) - Math.log10(min)); | ||
} | ||
function inverseLinearTransform(value, min, max) { | ||
export function inverseLinearTransform(value, min, max) { | ||
return min + value * (max - min); | ||
} | ||
function inverseLogarithmicTransform(value, min, max) { | ||
export function inverseLogarithmicTransform(value, min, max) { | ||
return Math.pow(10, value * (Math.log10(max) - Math.log10(min)) + Math.log10(min)); | ||
@@ -244,0 +194,0 @@ } |
import * as AI from "abstract-image"; | ||
import * as Axis from "./axis.js"; | ||
import { Axis, AxisBase, DiscreteAxisPoint } from "./axis.js"; | ||
export type Partial<T> = { | ||
@@ -18,6 +18,6 @@ [P in keyof T]?: T[P]; | ||
readonly chartDataAxisesRight: Array<ChartDataAxis>; | ||
readonly xAxisesBottom: ReadonlyArray<Axis.Axis>; | ||
readonly xAxisesTop: ReadonlyArray<Axis.Axis>; | ||
readonly yAxisesLeft: ReadonlyArray<Axis.Axis>; | ||
readonly yAxisesRight: ReadonlyArray<Axis.Axis>; | ||
readonly xAxisesBottom: ReadonlyArray<Axis>; | ||
readonly xAxisesTop: ReadonlyArray<Axis>; | ||
readonly yAxisesLeft: ReadonlyArray<Axis>; | ||
readonly yAxisesRight: ReadonlyArray<Axis>; | ||
readonly backgroundColor: AI.Color; | ||
@@ -123,3 +123,3 @@ readonly xGrid: ChartGrid; | ||
export declare function createChartStack(props: ChartStackProps): ChartStack; | ||
export type ChartDataAxis = Axis.AxisBase & { | ||
export type ChartDataAxis = AxisBase & { | ||
readonly points: Array<AI.Point>; | ||
@@ -131,4 +131,4 @@ }; | ||
export declare function generateBackground(xMin: number, xMax: number, yMin: number, yMax: number, chart: Chart): AI.Component; | ||
export declare function xAxises(xAxis: XAxis, xNumTicks: number, axises: ReadonlyArray<Axis.Axis>, xMin: number, xMax: number, yMin: number, yMax: number, xMinLineThicknessAdjustment: number, xMaxLineThicknessAdjustment: number, chart: Chart): readonly [AI.Component, AI.Component]; | ||
export declare function yAxises(yAxis: YAxis, yNumTicks: number, axises: ReadonlyArray<Axis.Axis>, xMin: number, xMax: number, yMin: number, yMax: number, yMinLineThicknessAdjustment: number, yMaxLineThicknessAdjustment: number, chart: Chart): readonly [AI.Component, AI.Component]; | ||
export declare function xAxises(xAxis: XAxis, xNumTicks: number, axises: ReadonlyArray<Axis>, xMin: number, xMax: number, yMin: number, yMax: number, xMinLineThicknessAdjustment: number, xMaxLineThicknessAdjustment: number, chart: Chart): readonly [AI.Component, AI.Component]; | ||
export declare function yAxises(yAxis: YAxis, yNumTicks: number, axises: ReadonlyArray<Axis>, xMin: number, xMax: number, yMin: number, yMax: number, yMinLineThicknessAdjustment: number, yMaxLineThicknessAdjustment: number, chart: Chart): readonly [AI.Component, AI.Component]; | ||
export declare function generateDataAxisesX(xAxis: XAxis, axises: Array<ChartDataAxis>, numTicks: number, xMin: number, xMax: number, yMin: number, yMax: number, chart: Chart): AI.Component; | ||
@@ -140,9 +140,9 @@ export declare function generateDataAxisesY(yAxis: YAxis, axises: Array<ChartDataAxis>, numTicks: number, xMin: number, xMax: number, yMin: number, yMax: number, chart: Chart): AI.Component; | ||
export declare function generateBars(xMin: number, xMax: number, yMin: number, yMax: number, chart: Chart): AI.Component; | ||
export declare function generateXAxisGridLines(xMin: number, xMax: number, yMin: number, yMax: number, xTicks: ReadonlyArray<Axis.DiscreteAxisPoint>, xAxis: Axis.Axis, xGrid: { | ||
export declare function generateXAxisGridLines(xMin: number, xMax: number, yMin: number, yMax: number, xTicks: ReadonlyArray<DiscreteAxisPoint>, xAxis: Axis, xGrid: { | ||
readonly color: AI.Color; | ||
readonly thickness: number; | ||
}): AI.Component; | ||
export declare function generateXAxisLabels(xMin: number, xMax: number, y: number, growVertical: AI.GrowthDirection, ticks: ReadonlyArray<Axis.DiscreteAxisPoint>, axis: Axis.Axis, chart: Chart): AI.Component; | ||
export declare function generateXAxisLabel(x: number, y: number, horizontalGrowthDirection: AI.GrowthDirection, verticalGrowthDirection: AI.GrowthDirection, axis: Axis.Axis, chart: Chart): AI.Component; | ||
export declare function generateYAxisLines(xMin: number, xMax: number, yMin: number, yMax: number, yTicks: ReadonlyArray<Axis.DiscreteAxisPoint>, yAxis: Axis.Axis, yGrid: { | ||
export declare function generateXAxisLabels(xMin: number, xMax: number, y: number, growVertical: AI.GrowthDirection, ticks: ReadonlyArray<DiscreteAxisPoint>, axis: Axis, chart: Chart): AI.Component; | ||
export declare function generateXAxisLabel(x: number, y: number, horizontalGrowthDirection: AI.GrowthDirection, verticalGrowthDirection: AI.GrowthDirection, axis: Axis, chart: Chart): AI.Component; | ||
export declare function generateYAxisLines(xMin: number, xMax: number, yMin: number, yMax: number, yTicks: ReadonlyArray<DiscreteAxisPoint>, yAxis: Axis, yGrid: { | ||
readonly color: AI.Color; | ||
@@ -154,5 +154,5 @@ readonly thickness: number; | ||
}): AI.Component; | ||
export declare function generateYAxisLabels(x: number, yMin: number, yMax: number, growHorizontal: AI.GrowthDirection, yTicks: ReadonlyArray<Axis.DiscreteAxisPoint>, yAxis: Axis.Axis, chart: Chart): AI.Component; | ||
export declare function generateYAxisLabel(x: number, y: number, rotation: number, horizontalGrowthDirection: AI.GrowthDirection, verticalGrowthDirection: AI.GrowthDirection, axis: Axis.Axis, chart: Chart): AI.Component; | ||
export declare function generateYAxisLabels(x: number, yMin: number, yMax: number, growHorizontal: AI.GrowthDirection, yTicks: ReadonlyArray<DiscreteAxisPoint>, yAxis: Axis, chart: Chart): AI.Component; | ||
export declare function generateYAxisLabel(x: number, y: number, rotation: number, horizontalGrowthDirection: AI.GrowthDirection, verticalGrowthDirection: AI.GrowthDirection, axis: Axis, chart: Chart): AI.Component; | ||
export {}; | ||
//# sourceMappingURL=chart.d.ts.map |
160
lib/chart.js
@@ -1,65 +0,7 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || (function () { | ||
var ownKeys = function(o) { | ||
ownKeys = Object.getOwnPropertyNames || function (o) { | ||
var ar = []; | ||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
return ar; | ||
}; | ||
return ownKeys(o); | ||
}; | ||
return function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createChart = createChart; | ||
exports.createChartPoint = createChartPoint; | ||
exports.createChartLine = createChartLine; | ||
exports.createChartStackConfig = createChartStackConfig; | ||
exports.createChartStack = createChartStack; | ||
exports.createChartDataAxis = createChartDataAxis; | ||
exports.inverseTransformPoint = inverseTransformPoint; | ||
exports.renderChart = renderChart; | ||
exports.generateBackground = generateBackground; | ||
exports.xAxises = xAxises; | ||
exports.yAxises = yAxises; | ||
exports.generateDataAxisesX = generateDataAxisesX; | ||
exports.generateDataAxisesY = generateDataAxisesY; | ||
exports.generateStack = generateStack; | ||
exports.generateLines = generateLines; | ||
exports.generatePoints = generatePoints; | ||
exports.generateBars = generateBars; | ||
exports.generateXAxisGridLines = generateXAxisGridLines; | ||
exports.generateXAxisLabels = generateXAxisLabels; | ||
exports.generateXAxisLabel = generateXAxisLabel; | ||
exports.generateYAxisLines = generateYAxisLines; | ||
exports.generateYAxisLabels = generateYAxisLabels; | ||
exports.generateYAxisLabel = generateYAxisLabel; | ||
/* eslint-disable max-lines */ | ||
const AI = __importStar(require("abstract-image")); | ||
const Axis = __importStar(require("./axis.js")); | ||
const ts_exhaustive_check_1 = require("ts-exhaustive-check"); | ||
import { exhaustiveCheck } from "ts-exhaustive-check"; | ||
import * as AI from "abstract-image"; | ||
import { inverseTransformValue, getTicks, createLinearAxis, transformValue, transformPoint, } from "./axis.js"; | ||
const axisLabelPosFactor = 0.65; | ||
function createChart(props) { | ||
export function createChart(props) { | ||
return { | ||
@@ -104,3 +46,3 @@ width: props.width ?? 600, | ||
} | ||
function createChartPoint(props) { | ||
export function createChartPoint(props) { | ||
const { shape = "circle", position = AI.createPoint(0, 0), color = AI.black, strokeColor = AI.black, strokeThickness = 1, size = AI.createSize(6, 6), label = "", xAxis = "bottom", yAxis = "left", fontSize, textColor, textOutlineColor, id, } = props || {}; | ||
@@ -123,15 +65,15 @@ return { | ||
} | ||
function createChartLine(props) { | ||
export function createChartLine(props) { | ||
const { points = [], color = AI.black, thickness = 1, label = "", xAxis = "bottom", yAxis = "left", fontSize, textColor, textOutlineColor, id, } = props || {}; | ||
return { points, color, thickness, label, xAxis, yAxis, fontSize, textColor, textOutlineColor, id }; | ||
} | ||
function createChartStackConfig(props) { | ||
export function createChartStackConfig(props) { | ||
const { color = AI.black, label = "" } = props || {}; | ||
return { color, label }; | ||
} | ||
function createChartStack(props) { | ||
export function createChartStack(props) { | ||
const { points = [], xAxis = "bottom", yAxis = "left", config = [createChartStackConfig({})] } = props || {}; | ||
return { points, xAxis, yAxis, config }; | ||
} | ||
function createChartDataAxis(points, label, labelRotation, tickLabelDisp, labelColor, tickLabelColor, thickness, axisColor, tickFontSize, axisFontSize, id) { | ||
export function createChartDataAxis(points, label, labelRotation, tickLabelDisp, labelColor, tickLabelColor, thickness, axisColor, tickFontSize, axisFontSize, id) { | ||
return { | ||
@@ -151,3 +93,3 @@ points, | ||
} | ||
function inverseTransformPoint(point, chart, xAxis, yAxis) { | ||
export function inverseTransformPoint(point, chart, xAxis, yAxis) { | ||
const padding = finalPadding(chart); | ||
@@ -158,4 +100,4 @@ const xMin = padding.left; | ||
const yMax = padding.top; | ||
const x = Axis.inverseTransformValue(point.x, xMin, xMax, xAxis === "top" ? chart.xAxisesTop[0] : chart.xAxisesBottom[0]); | ||
const y = Axis.inverseTransformValue(point.y, yMin, yMax, yAxis === "right" ? chart.yAxisesRight[0] : chart.yAxisesLeft[0]); | ||
const x = inverseTransformValue(point.x, xMin, xMax, xAxis === "top" ? chart.xAxisesTop[0] : chart.xAxisesBottom[0]); | ||
const y = inverseTransformValue(point.y, yMin, yMax, yAxis === "right" ? chart.yAxisesRight[0] : chart.yAxisesLeft[0]); | ||
if (x === undefined || y === undefined) { | ||
@@ -186,3 +128,3 @@ return undefined; | ||
} | ||
function renderChart(chart) { | ||
export function renderChart(chart) { | ||
const { width, height, xAxisesBottom, xAxisesTop, yAxisesLeft, yAxisesRight } = chart; | ||
@@ -244,6 +186,6 @@ const padding = finalPadding(chart); | ||
} | ||
function generateBackground(xMin, xMax, yMin, yMax, chart) { | ||
export function generateBackground(xMin, xMax, yMin, yMax, chart) { | ||
return AI.createRectangle(AI.createPoint(xMin, yMax), AI.createPoint(xMax, yMin), AI.transparent, 0, chart.backgroundColor); | ||
} | ||
function xAxises(xAxis, xNumTicks, axises, xMin, xMax, yMin, yMax, xMinLineThicknessAdjustment, xMaxLineThicknessAdjustment, chart) { | ||
export function xAxises(xAxis, xNumTicks, axises, xMin, xMax, yMin, yMax, xMinLineThicknessAdjustment, xMaxLineThicknessAdjustment, chart) { | ||
const components = Array(); | ||
@@ -255,3 +197,3 @@ const gridLineComponents = Array(); | ||
const fullGrid = ix === 0 && xAxis === "bottom"; | ||
const xTicks = Axis.getTicks(xNumTicks, axis); | ||
const xTicks = getTicks(xNumTicks, axis); | ||
if (chart.xGrid && !axis.noTicks) { | ||
@@ -279,3 +221,3 @@ gridLineComponents.push(generateXAxisGridLines(xMin, xMax, lineY + dirFactor * 10, fullGrid ? yMax : lineY, xTicks, axis, chart.xGrid)); | ||
default: | ||
return (0, ts_exhaustive_check_1.exhaustiveCheck)(chart.labelLayout); | ||
return exhaustiveCheck(chart.labelLayout); | ||
} | ||
@@ -287,3 +229,3 @@ } | ||
} | ||
function yAxises(yAxis, yNumTicks, axises, xMin, xMax, yMin, yMax, yMinLineThicknessAdjustment, yMaxLineThicknessAdjustment, chart) { | ||
export function yAxises(yAxis, yNumTicks, axises, xMin, xMax, yMin, yMax, yMinLineThicknessAdjustment, yMaxLineThicknessAdjustment, chart) { | ||
const components = Array(); | ||
@@ -295,3 +237,3 @@ const gridLineComponents = Array(); | ||
const fullGrid = ix === 0 && yAxis === "left"; | ||
const yTicks = Axis.getTicks(yNumTicks, axis); | ||
const yTicks = getTicks(yNumTicks, axis); | ||
if (chart.yGrid && !axis.noTicks) { | ||
@@ -320,3 +262,3 @@ gridLineComponents.push(generateYAxisLines(lineX + dirFactor * 10, fullGrid ? xMax : lineX, yMin, yMax, yTicks, axis, chart.yGrid, chart.xGrid)); | ||
default: | ||
return (0, ts_exhaustive_check_1.exhaustiveCheck)(chart.labelLayout); | ||
return exhaustiveCheck(chart.labelLayout); | ||
} | ||
@@ -328,3 +270,3 @@ } | ||
} | ||
function generateDataAxisesX(xAxis, axises, numTicks, xMin, xMax, yMin, yMax, chart) { | ||
export function generateDataAxisesX(xAxis, axises, numTicks, xMin, xMax, yMin, yMax, chart) { | ||
const components = Array(); | ||
@@ -338,3 +280,3 @@ let lineY = xAxis === "bottom" | ||
const max = Math.max(...axis.points.map((p) => p.y)); | ||
const linear = Axis.createLinearAxis(min, max, axis.label, axis.labelColor, axis.labelRotation, axis.tickLabelDisp, axis.thickness, axis.axisColor, axis.id); | ||
const linear = createLinearAxis(min, max, axis.label, axis.labelColor, axis.labelRotation, axis.tickLabelDisp, axis.thickness, axis.axisColor, axis.id); | ||
const findX = (y) => { | ||
@@ -358,7 +300,7 @@ for (let i = 0; i < axis.points.length; ++i) { | ||
}; | ||
const yValues = Axis.getTicks(numTicks, linear).map((t) => t.value); | ||
const yValues = getTicks(numTicks, linear).map((t) => t.value); | ||
const lineY2 = lineY; | ||
components.push(...yValues.flatMap((y) => { | ||
const tickX = findX(y); | ||
const x = Axis.transformValue(tickX, xMin, xMax, chart.xAxisesBottom[0]); | ||
const x = transformValue(tickX, xMin, xMax, chart.xAxisesBottom[0]); | ||
const start = AI.createPoint(x, lineY2); | ||
@@ -385,3 +327,3 @@ const end = AI.createPoint(x, lineY2 + dirFactor * 10); | ||
default: | ||
return (0, ts_exhaustive_check_1.exhaustiveCheck)(chart.labelLayout); | ||
return exhaustiveCheck(chart.labelLayout); | ||
} | ||
@@ -392,3 +334,3 @@ lineY += dirFactor * axisWidth; | ||
} | ||
function generateDataAxisesY(yAxis, axises, numTicks, xMin, xMax, yMin, yMax, chart) { | ||
export function generateDataAxisesY(yAxis, axises, numTicks, xMin, xMax, yMin, yMax, chart) { | ||
const components = Array(); | ||
@@ -402,3 +344,3 @@ let lineX = yAxis === "left" | ||
const max = Math.max(...axis.points.map((p) => p.y)); | ||
const linear = Axis.createLinearAxis(min, max, axis.label, axis.labelColor, axis.labelRotation, axis.tickLabelDisp, axis.thickness, axis.axisColor, axis.id); | ||
const linear = createLinearAxis(min, max, axis.label, axis.labelColor, axis.labelRotation, axis.tickLabelDisp, axis.thickness, axis.axisColor, axis.id); | ||
const findX = (y) => { | ||
@@ -422,7 +364,7 @@ for (let i = 0; i < axis.points.length; ++i) { | ||
}; | ||
const yValues = Axis.getTicks(numTicks, linear).map((t) => t.value); | ||
const yValues = getTicks(numTicks, linear).map((t) => t.value); | ||
const lineX2 = lineX; | ||
components.push(...yValues.flatMap((y) => { | ||
const tickY = findX(y); | ||
const yPx = Axis.transformValue(tickY, yMin, yMax, chart.yAxisesLeft[0]); | ||
const yPx = transformValue(tickY, yMin, yMax, chart.yAxisesLeft[0]); | ||
const start = AI.createPoint(lineX2, yPx); | ||
@@ -450,3 +392,3 @@ const end = AI.createPoint(lineX2 + dirFactor * 10, yPx); | ||
default: | ||
return (0, ts_exhaustive_check_1.exhaustiveCheck)(chart.labelLayout); | ||
return exhaustiveCheck(chart.labelLayout); | ||
} | ||
@@ -457,3 +399,3 @@ lineX += dirFactor * axisWidth; | ||
} | ||
function generateStack(xMin, xMax, yMin, yMax, chart) { | ||
export function generateStack(xMin, xMax, yMin, yMax, chart) { | ||
const pointsPos = chart.chartStack.points.map((stackPoint) => ({ | ||
@@ -487,3 +429,3 @@ x: stackPoint.x, | ||
sumY += y; | ||
return Axis.transformPoint(AI.createPoint(stackPoints.x, sumY), xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
return transformPoint(AI.createPoint(stackPoints.x, sumY), xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
}); | ||
@@ -501,3 +443,3 @@ return points; | ||
const polygons = []; | ||
let lastLine = chart.chartStack.points.map((stackPoint) => Axis.transformPoint(AI.createPoint(stackPoint.x, 0), xMin, xMax, yMin, yMax, xAxis, yAxis)); | ||
let lastLine = chart.chartStack.points.map((stackPoint) => transformPoint(AI.createPoint(stackPoint.x, 0), xMin, xMax, yMin, yMax, xAxis, yAxis)); | ||
lines.forEach((line, index) => { | ||
@@ -515,3 +457,3 @@ const config = chart.chartStack.config[index]; | ||
} | ||
function generateLines(xMin, xMax, yMin, yMax, chart) { | ||
export function generateLines(xMin, xMax, yMin, yMax, chart) { | ||
const lines = chart.chartLines.map((l) => { | ||
@@ -523,3 +465,3 @@ if (l.points.length < 2) { | ||
const yAxis = l.yAxis === "right" ? chart.yAxisesRight[0] : chart.yAxisesLeft[0]; | ||
const points = l.points.map((p) => Axis.transformPoint(p, xMin, xMax, yMin, yMax, xAxis, yAxis)); | ||
const points = l.points.map((p) => transformPoint(p, xMin, xMax, yMin, yMax, xAxis, yAxis)); | ||
const segments = getLineSegmentsInsideChart(xMin, xMax, yMin, yMax, points); | ||
@@ -604,7 +546,7 @@ const components = []; | ||
} | ||
function generatePoints(xMin, xMax, yMin, yMax, chart) { | ||
export function generatePoints(xMin, xMax, yMin, yMax, chart) { | ||
const points = chart.chartPoints.map((p) => { | ||
const xAxis = p.xAxis === "top" ? chart.xAxisesTop[0] : chart.xAxisesBottom[0]; | ||
const yAxis = p.yAxis === "right" ? chart.yAxisesRight[0] : chart.yAxisesLeft[0]; | ||
const position = Axis.transformPoint(p.position, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const position = transformPoint(p.position, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const outlineColor = p.textOutlineColor ?? chart.textOutlineColor; | ||
@@ -628,3 +570,3 @@ const components = [ | ||
} | ||
function generateBars(xMin, xMax, yMin, yMax, chart) { | ||
export function generateBars(xMin, xMax, yMin, yMax, chart) { | ||
const components = Array(); | ||
@@ -653,5 +595,5 @@ for (const bars of chart.chartBars) { | ||
]; | ||
const pos = Axis.transformPoint(middle, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const topLeft = Axis.transformPoint(tl, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const bottomRight = Axis.transformPoint(br, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const pos = transformPoint(middle, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const topLeft = transformPoint(tl, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const bottomRight = transformPoint(br, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
components.push(AI.createRectangle(topLeft, bottomRight, b.strokeColor ?? AI.transparent, b.strokeThickness ?? 0, b.color, b.id, AI.solidLine, bars.radius)); | ||
@@ -693,5 +635,5 @@ if (b.label) { | ||
} | ||
function generateXAxisGridLines(xMin, xMax, yMin, yMax, xTicks, xAxis, xGrid) { | ||
export function generateXAxisGridLines(xMin, xMax, yMin, yMax, xTicks, xAxis, xGrid) { | ||
const xLines = xTicks.map((l) => { | ||
const x = Axis.transformValue(l.value, xMin, xMax, xAxis); | ||
const x = transformValue(l.value, xMin, xMax, xAxis); | ||
const start = AI.createPoint(x, yMin); | ||
@@ -703,3 +645,3 @@ const end = AI.createPoint(x, yMax); | ||
} | ||
function generateXAxisLabels(xMin, xMax, y, growVertical, ticks, axis, chart) { | ||
export function generateXAxisLabels(xMin, xMax, y, growVertical, ticks, axis, chart) { | ||
const rotation = axis.labelRotation ?? 0; | ||
@@ -718,3 +660,3 @@ const horizontalGrowth = (() => { | ||
const xLabels = ticks.map((l) => { | ||
const position = AI.createPoint(Axis.transformValue(l.value, xMin, xMax, axis), y); | ||
const position = AI.createPoint(transformValue(l.value, xMin, xMax, axis), y); | ||
return AI.createText(position, l.label ?? formatNumber(l.value), chart.font, axis.tickFontSize ?? chart.fontSize, axis.labelColor ?? AI.black, "normal", rotation, "center", horizontalGrowth, growVertical, 0, axis.labelColor ?? AI.black, false); | ||
@@ -724,9 +666,9 @@ }); | ||
} | ||
function generateXAxisLabel(x, y, horizontalGrowthDirection, verticalGrowthDirection, axis, chart) { | ||
export function generateXAxisLabel(x, y, horizontalGrowthDirection, verticalGrowthDirection, axis, chart) { | ||
const position = AI.createPoint(x, y); | ||
return AI.createText(position, axis.label ?? "", chart.font, axis.axisFontSize ?? chart.fontSize, axis.labelColor ?? AI.black, "normal", 0, "center", horizontalGrowthDirection, verticalGrowthDirection, 0, axis.labelColor ?? AI.black, false, axis.id); | ||
} | ||
function generateYAxisLines(xMin, xMax, yMin, yMax, yTicks, yAxis, yGrid, xGrid) { | ||
export function generateYAxisLines(xMin, xMax, yMin, yMax, yTicks, yAxis, yGrid, xGrid) { | ||
const yLines = yTicks.map((l) => { | ||
const y = Axis.transformValue(l.value, yMin, yMax, yAxis); | ||
const y = transformValue(l.value, yMin, yMax, yAxis); | ||
const start = AI.createPoint(xMin - xGrid.thickness / 2, y); | ||
@@ -738,3 +680,3 @@ const end = AI.createPoint(xMax + xGrid.thickness / 2, y); | ||
} | ||
function generateYAxisLabels(x, yMin, yMax, growHorizontal, yTicks, yAxis, chart) { | ||
export function generateYAxisLabels(x, yMin, yMax, growHorizontal, yTicks, yAxis, chart) { | ||
const rotation = yAxis.labelRotation ?? 0; | ||
@@ -753,3 +695,3 @@ const growVertical = (() => { | ||
const yLabels = yTicks.map((l) => { | ||
const position = AI.createPoint(x, Axis.transformValue(l.value, yMin, yMax, yAxis)); | ||
const position = AI.createPoint(x, transformValue(l.value, yMin, yMax, yAxis)); | ||
return AI.createText(position, l.label ?? formatNumber(l.value), chart.font, yAxis.tickFontSize ?? chart.fontSize, yAxis.labelColor ?? AI.black, "normal", rotation, "center", growHorizontal, growVertical, 0, yAxis.labelColor ?? AI.black, false); | ||
@@ -759,3 +701,3 @@ }); | ||
} | ||
function generateYAxisLabel(x, y, rotation, horizontalGrowthDirection, verticalGrowthDirection, axis, chart) { | ||
export function generateYAxisLabel(x, y, rotation, horizontalGrowthDirection, verticalGrowthDirection, axis, chart) { | ||
const position = AI.createPoint(x, y); | ||
@@ -762,0 +704,0 @@ return AI.createText(position, axis.label ?? "", chart.font, axis.axisFontSize ?? chart.fontSize, axis.labelColor ?? AI.black, "normal", rotation, "center", horizontalGrowthDirection, verticalGrowthDirection, 0, axis.labelColor ?? AI.black, false, axis.id); |
@@ -1,19 +0,3 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./axis.js"), exports); | ||
__exportStar(require("./chart.js"), exports); | ||
export * from "./axis.js"; | ||
export * from "./chart.js"; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "abstract-chart", | ||
"version": "10.0.11", | ||
"version": "10.0.12", | ||
"description": "Drawing charts using multiple unit of measure axes as coordinate system", | ||
@@ -21,6 +21,6 @@ "repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-chart", | ||
"dependencies": { | ||
"abstract-image": "^11.0.3", | ||
"abstract-image": "^11.0.4", | ||
"ts-exhaustive-check": "^1.0.0" | ||
}, | ||
"gitHead": "445cb777bc7bf2d301fea27a7bda61d00a9f0e43" | ||
"gitHead": "2b28beae0303be1d261b3b91a7bd946986ba334a" | ||
} |
@@ -26,3 +26,3 @@ # abstract-chart | ||
```typescript | ||
import * as React from "react"; | ||
import React from "react"; | ||
import * as AbstractChart from "abstract-chart"; | ||
@@ -29,0 +29,0 @@ import * as AbstractImage from "abstract-image"; |
/* eslint-disable max-lines */ | ||
import { exhaustiveCheck } from "ts-exhaustive-check"; | ||
import * as AI from "abstract-image"; | ||
import * as Axis from "./axis.js"; | ||
import { exhaustiveCheck } from "ts-exhaustive-check"; | ||
import { | ||
Axis, | ||
AxisBase, | ||
inverseTransformValue, | ||
getTicks, | ||
createLinearAxis, | ||
transformValue, | ||
transformPoint, | ||
DiscreteAxisPoint, | ||
} from "./axis.js"; | ||
@@ -25,6 +34,6 @@ // tslint:disable:max-file-line-count | ||
readonly chartDataAxisesRight: Array<ChartDataAxis>; | ||
readonly xAxisesBottom: ReadonlyArray<Axis.Axis>; | ||
readonly xAxisesTop: ReadonlyArray<Axis.Axis>; | ||
readonly yAxisesLeft: ReadonlyArray<Axis.Axis>; | ||
readonly yAxisesRight: ReadonlyArray<Axis.Axis>; | ||
readonly xAxisesBottom: ReadonlyArray<Axis>; | ||
readonly xAxisesTop: ReadonlyArray<Axis>; | ||
readonly yAxisesLeft: ReadonlyArray<Axis>; | ||
readonly yAxisesRight: ReadonlyArray<Axis>; | ||
readonly backgroundColor: AI.Color; | ||
@@ -234,3 +243,3 @@ readonly xGrid: ChartGrid; | ||
export type ChartDataAxis = Axis.AxisBase & { | ||
export type ChartDataAxis = AxisBase & { | ||
readonly points: Array<AI.Point>; | ||
@@ -273,9 +282,4 @@ }; | ||
const yMax = padding.top; | ||
const x = Axis.inverseTransformValue( | ||
point.x, | ||
xMin, | ||
xMax, | ||
xAxis === "top" ? chart.xAxisesTop[0] : chart.xAxisesBottom[0] | ||
); | ||
const y = Axis.inverseTransformValue( | ||
const x = inverseTransformValue(point.x, xMin, xMax, xAxis === "top" ? chart.xAxisesTop[0] : chart.xAxisesBottom[0]); | ||
const y = inverseTransformValue( | ||
point.y, | ||
@@ -467,3 +471,3 @@ yMin, | ||
xNumTicks: number, | ||
axises: ReadonlyArray<Axis.Axis>, | ||
axises: ReadonlyArray<Axis>, | ||
xMin: number, | ||
@@ -483,3 +487,3 @@ xMax: number, | ||
const fullGrid = ix === 0 && xAxis === "bottom"; | ||
const xTicks = Axis.getTicks(xNumTicks, axis); | ||
const xTicks = getTicks(xNumTicks, axis); | ||
if (chart.xGrid && !axis.noTicks) { | ||
@@ -541,3 +545,3 @@ gridLineComponents.push( | ||
yNumTicks: number, | ||
axises: ReadonlyArray<Axis.Axis>, | ||
axises: ReadonlyArray<Axis>, | ||
xMin: number, | ||
@@ -558,3 +562,3 @@ xMax: number, | ||
const fullGrid = ix === 0 && yAxis === "left"; | ||
const yTicks = Axis.getTicks(yNumTicks, axis); | ||
const yTicks = getTicks(yNumTicks, axis); | ||
if (chart.yGrid && !axis.noTicks) { | ||
@@ -634,3 +638,3 @@ gridLineComponents.push( | ||
const max = Math.max(...axis.points.map((p) => p.y)); | ||
const linear = Axis.createLinearAxis( | ||
const linear = createLinearAxis( | ||
min, | ||
@@ -664,3 +668,3 @@ max, | ||
}; | ||
const yValues = Axis.getTicks(numTicks, linear).map((t) => t.value); | ||
const yValues = getTicks(numTicks, linear).map((t) => t.value); | ||
const lineY2 = lineY; | ||
@@ -670,3 +674,3 @@ components.push( | ||
const tickX = findX(y); | ||
const x = Axis.transformValue(tickX, xMin, xMax, chart.xAxisesBottom[0]); | ||
const x = transformValue(tickX, xMin, xMax, chart.xAxisesBottom[0]); | ||
const start = AI.createPoint(x, lineY2); | ||
@@ -747,3 +751,3 @@ const end = AI.createPoint(x, lineY2 + dirFactor * 10); | ||
const max = Math.max(...axis.points.map((p) => p.y)); | ||
const linear = Axis.createLinearAxis( | ||
const linear = createLinearAxis( | ||
min, | ||
@@ -777,3 +781,3 @@ max, | ||
}; | ||
const yValues = Axis.getTicks(numTicks, linear).map((t) => t.value); | ||
const yValues = getTicks(numTicks, linear).map((t) => t.value); | ||
const lineX2 = lineX; | ||
@@ -783,3 +787,3 @@ components.push( | ||
const tickY = findX(y); | ||
const yPx = Axis.transformValue(tickY, yMin, yMax, chart.yAxisesLeft[0]); | ||
const yPx = transformValue(tickY, yMin, yMax, chart.yAxisesLeft[0]); | ||
const start = AI.createPoint(lineX2, yPx); | ||
@@ -880,3 +884,3 @@ const end = AI.createPoint(lineX2 + dirFactor * 10, yPx); | ||
sumY += y; | ||
return Axis.transformPoint(AI.createPoint(stackPoints.x, sumY), xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
return transformPoint(AI.createPoint(stackPoints.x, sumY), xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
}); | ||
@@ -897,3 +901,3 @@ return points; | ||
let lastLine = chart.chartStack.points.map((stackPoint) => | ||
Axis.transformPoint(AI.createPoint(stackPoint.x, 0), xMin, xMax, yMin, yMax, xAxis, yAxis) | ||
transformPoint(AI.createPoint(stackPoint.x, 0), xMin, xMax, yMin, yMax, xAxis, yAxis) | ||
); | ||
@@ -921,3 +925,3 @@ lines.forEach((line, index) => { | ||
const yAxis = l.yAxis === "right" ? chart.yAxisesRight[0] : chart.yAxisesLeft[0]; | ||
const points = l.points.map((p) => Axis.transformPoint(p, xMin, xMax, yMin, yMax, xAxis, yAxis)); | ||
const points = l.points.map((p) => transformPoint(p, xMin, xMax, yMin, yMax, xAxis, yAxis)); | ||
const segments = getLineSegmentsInsideChart(xMin, xMax, yMin, yMax, points); | ||
@@ -1039,3 +1043,3 @@ const components = []; | ||
const yAxis = p.yAxis === "right" ? chart.yAxisesRight[0] : chart.yAxisesLeft[0]; | ||
const position = Axis.transformPoint(p.position, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const position = transformPoint(p.position, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const outlineColor = p.textOutlineColor ?? chart.textOutlineColor; | ||
@@ -1110,5 +1114,5 @@ const components = [ | ||
]; | ||
const pos = Axis.transformPoint(middle, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const topLeft = Axis.transformPoint(tl, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const bottomRight = Axis.transformPoint(br, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const pos = transformPoint(middle, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const topLeft = transformPoint(tl, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
const bottomRight = transformPoint(br, xMin, xMax, yMin, yMax, xAxis, yAxis); | ||
components.push( | ||
@@ -1185,8 +1189,8 @@ AI.createRectangle( | ||
yMax: number, | ||
xTicks: ReadonlyArray<Axis.DiscreteAxisPoint>, | ||
xAxis: Axis.Axis, | ||
xTicks: ReadonlyArray<DiscreteAxisPoint>, | ||
xAxis: Axis, | ||
xGrid: { readonly color: AI.Color; readonly thickness: number } | ||
): AI.Component { | ||
const xLines = xTicks.map((l) => { | ||
const x = Axis.transformValue(l.value, xMin, xMax, xAxis); | ||
const x = transformValue(l.value, xMin, xMax, xAxis); | ||
const start = AI.createPoint(x, yMin); | ||
@@ -1205,4 +1209,4 @@ const end = AI.createPoint(x, yMax); | ||
growVertical: AI.GrowthDirection, | ||
ticks: ReadonlyArray<Axis.DiscreteAxisPoint>, | ||
axis: Axis.Axis, | ||
ticks: ReadonlyArray<DiscreteAxisPoint>, | ||
axis: Axis, | ||
chart: Chart | ||
@@ -1223,3 +1227,3 @@ ): AI.Component { | ||
const xLabels = ticks.map((l) => { | ||
const position = AI.createPoint(Axis.transformValue(l.value, xMin, xMax, axis), y); | ||
const position = AI.createPoint(transformValue(l.value, xMin, xMax, axis), y); | ||
return AI.createText( | ||
@@ -1249,3 +1253,3 @@ position, | ||
verticalGrowthDirection: AI.GrowthDirection, | ||
axis: Axis.Axis, | ||
axis: Axis, | ||
chart: Chart | ||
@@ -1277,4 +1281,4 @@ ): AI.Component { | ||
yMax: number, | ||
yTicks: ReadonlyArray<Axis.DiscreteAxisPoint>, | ||
yAxis: Axis.Axis, | ||
yTicks: ReadonlyArray<DiscreteAxisPoint>, | ||
yAxis: Axis, | ||
yGrid: { readonly color: AI.Color; readonly thickness: number }, | ||
@@ -1284,3 +1288,3 @@ xGrid: { readonly color: AI.Color; readonly thickness: number } | ||
const yLines = yTicks.map((l) => { | ||
const y = Axis.transformValue(l.value, yMin, yMax, yAxis); | ||
const y = transformValue(l.value, yMin, yMax, yAxis); | ||
const start = AI.createPoint(xMin - xGrid.thickness / 2, y); | ||
@@ -1298,4 +1302,4 @@ const end = AI.createPoint(xMax + xGrid.thickness / 2, y); | ||
growHorizontal: AI.GrowthDirection, | ||
yTicks: ReadonlyArray<Axis.DiscreteAxisPoint>, | ||
yAxis: Axis.Axis, | ||
yTicks: ReadonlyArray<DiscreteAxisPoint>, | ||
yAxis: Axis, | ||
chart: Chart | ||
@@ -1316,3 +1320,3 @@ ): AI.Component { | ||
const yLabels = yTicks.map((l) => { | ||
const position = AI.createPoint(x, Axis.transformValue(l.value, yMin, yMax, yAxis)); | ||
const position = AI.createPoint(x, transformValue(l.value, yMin, yMax, yAxis)); | ||
return AI.createText( | ||
@@ -1343,3 +1347,3 @@ position, | ||
verticalGrowthDirection: AI.GrowthDirection, | ||
axis: Axis.Axis, | ||
axis: Axis, | ||
chart: Chart | ||
@@ -1346,0 +1350,0 @@ ): AI.Component { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173407
2607
Updatedabstract-image@^11.0.4