@pie-lib/charting 7.0.4-next.0 → 7.0.4-next.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +17 -0
- package/CHANGELOG.md +1116 -0
- package/LICENSE.md +5 -0
- package/lib/actions-button.js +145 -0
- package/lib/actions-button.js.map +1 -0
- package/lib/axes.js +643 -0
- package/lib/axes.js.map +1 -0
- package/lib/bars/bar.js +58 -0
- package/lib/bars/bar.js.map +1 -0
- package/lib/bars/common/bars.js +277 -0
- package/lib/bars/common/bars.js.map +1 -0
- package/lib/bars/common/correct-check-icon.js +54 -0
- package/lib/bars/common/correct-check-icon.js.map +1 -0
- package/lib/bars/histogram.js +59 -0
- package/lib/bars/histogram.js.map +1 -0
- package/lib/chart-setup.js +382 -0
- package/lib/chart-setup.js.map +1 -0
- package/lib/chart-type.js +80 -0
- package/lib/chart-type.js.map +1 -0
- package/lib/chart-types.js +22 -0
- package/lib/chart-types.js.map +1 -0
- package/lib/chart.js +384 -0
- package/lib/chart.js.map +1 -0
- package/lib/common/correctness-indicators.js +156 -0
- package/lib/common/correctness-indicators.js.map +1 -0
- package/lib/common/drag-handle.js +160 -0
- package/lib/common/drag-handle.js.map +1 -0
- package/lib/common/drag-icon.js +52 -0
- package/lib/common/drag-icon.js.map +1 -0
- package/lib/common/styles.js +22 -0
- package/lib/common/styles.js.map +1 -0
- package/lib/grid.js +112 -0
- package/lib/grid.js.map +1 -0
- package/lib/index.js +42 -0
- package/lib/index.js.map +1 -0
- package/lib/key-legend.js +87 -0
- package/lib/key-legend.js.map +1 -0
- package/lib/line/common/drag-handle.js +146 -0
- package/lib/line/common/drag-handle.js.map +1 -0
- package/lib/line/common/line.js +214 -0
- package/lib/line/common/line.js.map +1 -0
- package/lib/line/line-cross.js +214 -0
- package/lib/line/line-cross.js.map +1 -0
- package/lib/line/line-dot.js +158 -0
- package/lib/line/line-dot.js.map +1 -0
- package/lib/mark-label.js +237 -0
- package/lib/mark-label.js.map +1 -0
- package/lib/plot/common/plot.js +349 -0
- package/lib/plot/common/plot.js.map +1 -0
- package/lib/plot/dot.js +110 -0
- package/lib/plot/dot.js.map +1 -0
- package/lib/plot/line.js +140 -0
- package/lib/plot/line.js.map +1 -0
- package/lib/tool-menu.js +106 -0
- package/lib/tool-menu.js.map +1 -0
- package/lib/utils.js +189 -0
- package/lib/utils.js.map +1 -0
- package/package.json +26 -36
- package/src/__tests__/actions-button.test.jsx +280 -0
- package/src/__tests__/axes.test.jsx +667 -0
- package/src/__tests__/chart-setup.test.jsx +532 -0
- package/src/__tests__/chart-type.test.jsx +23 -0
- package/src/__tests__/chart.test.jsx +86 -0
- package/src/__tests__/grid.test.jsx +37 -0
- package/src/__tests__/key-legend.test.jsx +223 -0
- package/src/__tests__/mark-label.test.jsx +33 -0
- package/src/__tests__/tool-menu.test.jsx +522 -0
- package/src/__tests__/utils.js +36 -0
- package/src/__tests__/utils.test.js +100 -0
- package/src/actions-button.jsx +115 -0
- package/src/axes.jsx +594 -0
- package/src/bars/__tests__/bar.test.jsx +45 -0
- package/src/bars/__tests__/histogram.test.jsx +45 -0
- package/src/bars/__tests__/utils.js +30 -0
- package/src/bars/bar.js +28 -0
- package/src/bars/common/__tests__/bars.test.jsx +68 -0
- package/src/bars/common/__tests__/utils.js +30 -0
- package/src/bars/common/bars.jsx +249 -0
- package/src/bars/common/correct-check-icon.jsx +25 -0
- package/src/bars/histogram.js +28 -0
- package/src/chart-setup.jsx +356 -0
- package/src/chart-type.js +59 -0
- package/src/chart-types.js +8 -0
- package/src/chart.jsx +357 -0
- package/src/common/__tests__/correctness-indicators.test.jsx +720 -0
- package/src/common/__tests__/drag-handle.test.jsx +58 -0
- package/src/common/__tests__/utils.js +30 -0
- package/src/common/correctness-indicators.jsx +128 -0
- package/src/common/drag-handle.jsx +125 -0
- package/src/common/drag-icon.jsx +36 -0
- package/src/common/styles.js +19 -0
- package/src/grid.jsx +80 -0
- package/src/index.js +7 -0
- package/src/key-legend.jsx +77 -0
- package/src/line/__tests__/line-cross.test.jsx +463 -0
- package/src/line/__tests__/line-dot.test.jsx +41 -0
- package/src/line/__tests__/utils.js +36 -0
- package/src/line/common/__tests__/drag-handle.test.jsx +62 -0
- package/src/line/common/__tests__/line.test.jsx +79 -0
- package/src/line/common/__tests__/utils.js +30 -0
- package/src/line/common/drag-handle.jsx +114 -0
- package/src/line/common/line.jsx +171 -0
- package/src/line/line-cross.js +144 -0
- package/src/line/line-dot.js +111 -0
- package/src/mark-label.jsx +238 -0
- package/src/plot/__tests__/dot.test.jsx +344 -0
- package/src/plot/__tests__/line.test.jsx +375 -0
- package/src/plot/__tests__/utils.js +30 -0
- package/src/plot/common/__tests__/plot.test.jsx +69 -0
- package/src/plot/common/__tests__/utils.js +30 -0
- package/src/plot/common/plot.jsx +358 -0
- package/src/plot/dot.js +74 -0
- package/src/plot/line.js +98 -0
- package/src/tool-menu.jsx +85 -0
- package/src/utils.js +201 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -23
- package/dist/actions-button.d.ts +0 -26
- package/dist/actions-button.js +0 -84
- package/dist/axes.d.ts +0 -84
- package/dist/axes.js +0 -376
- package/dist/bars/bar.d.ts +0 -47
- package/dist/bars/bar.js +0 -27
- package/dist/bars/common/bars.d.ts +0 -98
- package/dist/bars/common/bars.js +0 -174
- package/dist/bars/common/correct-check-icon.d.ts +0 -18
- package/dist/bars/common/correct-check-icon.js +0 -50
- package/dist/bars/histogram.d.ts +0 -47
- package/dist/bars/histogram.js +0 -28
- package/dist/chart-setup.d.ts +0 -29
- package/dist/chart-setup.js +0 -231
- package/dist/chart-type.d.ts +0 -32
- package/dist/chart-type.js +0 -68
- package/dist/chart-types.d.ts +0 -41
- package/dist/chart-types.js +0 -17
- package/dist/chart.d.ts +0 -88
- package/dist/chart.js +0 -250
- package/dist/common/correctness-indicators.d.ts +0 -70
- package/dist/common/correctness-indicators.js +0 -106
- package/dist/common/drag-handle.d.ts +0 -129
- package/dist/common/drag-handle.js +0 -120
- package/dist/common/drag-icon.d.ts +0 -23
- package/dist/common/drag-icon.js +0 -45
- package/dist/common/styles.d.ts +0 -23
- package/dist/common/styles.js +0 -17
- package/dist/grid.d.ts +0 -45
- package/dist/grid.js +0 -56
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -6
- package/dist/key-legend.d.ts +0 -19
- package/dist/key-legend.js +0 -46
- package/dist/line/common/drag-handle.d.ts +0 -120
- package/dist/line/common/drag-handle.js +0 -92
- package/dist/line/common/line.d.ts +0 -96
- package/dist/line/common/line.js +0 -114
- package/dist/line/line-cross.d.ts +0 -47
- package/dist/line/line-cross.js +0 -133
- package/dist/line/line-dot.d.ts +0 -47
- package/dist/line/line-dot.js +0 -101
- package/dist/mark-label.d.ts +0 -55
- package/dist/mark-label.js +0 -139
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -100
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisBottom.js +0 -45
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisLeft.js +0 -46
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -61
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -42
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -49
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/align.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/base.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/clamp.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/constant.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/domain.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/exponent.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/interpolate.js +0 -10
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/nice.js +0 -37
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/padding.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/range.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/reverse.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/round.js +0 -7
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/scaleOperator.js +0 -58
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/unknown.js +0 -6
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/zero.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/band.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/point.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +0 -10
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/createColorInterpolator.js +0 -29
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/isUtcScale.js +0 -7
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Bar.js +0 -28
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Circle.js +0 -28
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -46
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +0 -49
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +0 -9
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -52
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-interpolate.js +0 -8
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-scale.js +0 -8
- package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-time.js +0 -8
- package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +0 -32
- package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +0 -33
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +0 -8
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +0 -18
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +0 -20
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +0 -20
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +0 -37
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +0 -509
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +0 -108
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +0 -31
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +0 -45
- package/dist/node_modules/.bun/react-input-autosize@2.2.2_f4eacebf2041cd4f/node_modules/react-input-autosize/lib/AutosizeInput.js +0 -216
- package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +0 -49
- package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +0 -34
- package/dist/plot/common/plot.d.ts +0 -103
- package/dist/plot/common/plot.js +0 -227
- package/dist/plot/dot.d.ts +0 -47
- package/dist/plot/dot.js +0 -62
- package/dist/plot/line.d.ts +0 -47
- package/dist/plot/line.js +0 -84
- package/dist/tool-menu.d.ts +0 -31
- package/dist/utils.d.ts +0 -39
- package/dist/utils.js +0 -101
package/dist/plot/dot.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Circle.js";
|
|
2
|
-
import { dataToXBand as t } from "../utils.js";
|
|
3
|
-
import { correct as n, incorrect as r } from "../common/styles.js";
|
|
4
|
-
import i from "./common/plot.js";
|
|
5
|
-
import a from "react";
|
|
6
|
-
import o from "prop-types";
|
|
7
|
-
import { styled as s } from "@mui/material/styles";
|
|
8
|
-
import { types as c } from "@pie-lib/plot";
|
|
9
|
-
import { color as l } from "@pie-lib/render-ui";
|
|
10
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
11
|
-
//#region src/plot/dot.tsx
|
|
12
|
-
var d = s(e)(() => ({
|
|
13
|
-
fill: l.visualElementsColors.PLOT_FILL_COLOR,
|
|
14
|
-
"&.correct": n("stroke"),
|
|
15
|
-
"&.incorrect": r("stroke")
|
|
16
|
-
})), f = (t) => {
|
|
17
|
-
let { index: n, pointDiameter: r, barX: i, barWidth: a, pointHeight: o, label: s, value: c, scale: f, dottedOverline: p } = t, m = r / 2, h = i + (a - r) / 2 + m, g = f.y(n) - (o - r) / 2 - m;
|
|
18
|
-
return p ? /* @__PURE__ */ u(e, {
|
|
19
|
-
cx: h,
|
|
20
|
-
cy: g,
|
|
21
|
-
r: m + 2,
|
|
22
|
-
strokeDasharray: "4,4",
|
|
23
|
-
stroke: l.defaults.BORDER_GRAY,
|
|
24
|
-
fill: "none"
|
|
25
|
-
}, `point-${s}-${c}-${n}`) : /* @__PURE__ */ u(d, {
|
|
26
|
-
cx: h,
|
|
27
|
-
cy: g,
|
|
28
|
-
r: m
|
|
29
|
-
}, `point-${s}-${c}-${n}`);
|
|
30
|
-
};
|
|
31
|
-
f.propTypes = {
|
|
32
|
-
index: o.number,
|
|
33
|
-
pointDiameter: o.number,
|
|
34
|
-
barX: o.number,
|
|
35
|
-
barWidth: o.number,
|
|
36
|
-
pointHeight: o.number,
|
|
37
|
-
value: o.number,
|
|
38
|
-
label: o.string,
|
|
39
|
-
scale: o.object,
|
|
40
|
-
dottedOverline: o.bool
|
|
41
|
-
};
|
|
42
|
-
var p = class extends a.Component {
|
|
43
|
-
static propTypes = {
|
|
44
|
-
data: o.array,
|
|
45
|
-
onChange: o.func,
|
|
46
|
-
graphProps: c.GraphPropsType.isRequired
|
|
47
|
-
};
|
|
48
|
-
render() {
|
|
49
|
-
let e = this.props, { data: n, graphProps: r } = e, { scale: a = {}, size: o = {} } = r || {}, s = t(a.x, n, o.width, "dotPlot");
|
|
50
|
-
return /* @__PURE__ */ u(i, {
|
|
51
|
-
...e,
|
|
52
|
-
xBand: s,
|
|
53
|
-
CustomBarElement: f
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}, m = () => ({
|
|
57
|
-
type: "dotPlot",
|
|
58
|
-
Component: p,
|
|
59
|
-
name: "Dot Plot"
|
|
60
|
-
});
|
|
61
|
-
//#endregion
|
|
62
|
-
export { m as default };
|
package/dist/plot/line.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/charting/src/plot/line.js
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare class LinePlot extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
data: PropTypes.Requireable<any[]>;
|
|
14
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
16
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
17
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
}>>>;
|
|
20
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
-
}>>>;
|
|
24
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
25
|
-
min: PropTypes.Validator<number>;
|
|
26
|
-
max: PropTypes.Validator<number>;
|
|
27
|
-
step: PropTypes.Requireable<number>;
|
|
28
|
-
}>>>;
|
|
29
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
30
|
-
min: PropTypes.Validator<number>;
|
|
31
|
-
max: PropTypes.Validator<number>;
|
|
32
|
-
step: PropTypes.Requireable<number>;
|
|
33
|
-
}>>>;
|
|
34
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
-
width: PropTypes.Validator<number>;
|
|
36
|
-
height: PropTypes.Validator<number>;
|
|
37
|
-
}>>>;
|
|
38
|
-
}>>>;
|
|
39
|
-
};
|
|
40
|
-
render(): React.JSX.Element;
|
|
41
|
-
}
|
|
42
|
-
declare const _default: () => {
|
|
43
|
-
type: string;
|
|
44
|
-
Component: typeof LinePlot;
|
|
45
|
-
name: string;
|
|
46
|
-
};
|
|
47
|
-
export default _default;
|
package/dist/plot/line.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
2
|
-
import t from "../node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js";
|
|
3
|
-
import { dataToXBand as n } from "../utils.js";
|
|
4
|
-
import { correct as r, incorrect as i } from "../common/styles.js";
|
|
5
|
-
import a from "./common/plot.js";
|
|
6
|
-
import o from "react";
|
|
7
|
-
import s from "prop-types";
|
|
8
|
-
import { styled as c } from "@mui/material/styles";
|
|
9
|
-
import { types as l } from "@pie-lib/plot";
|
|
10
|
-
import { color as u } from "@pie-lib/render-ui";
|
|
11
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
-
//#region src/plot/line.tsx
|
|
13
|
-
var p = c(t)(() => ({
|
|
14
|
-
stroke: u.visualElementsColors.PLOT_FILL_COLOR,
|
|
15
|
-
"&.correct": r("stroke"),
|
|
16
|
-
"&.incorrect": i("stroke")
|
|
17
|
-
})), m = (t) => {
|
|
18
|
-
let { index: n, pointDiameter: r, barX: i, barWidth: a, pointHeight: o, label: s, value: c, scale: l, dottedOverline: m } = t, h = i + (a - r) / 2, g = l.y(n) - (o - r) / 2;
|
|
19
|
-
return m ? /* @__PURE__ */ d("rect", {
|
|
20
|
-
x: h - 2,
|
|
21
|
-
y: g - r - 2,
|
|
22
|
-
width: r + 4,
|
|
23
|
-
height: r + 4,
|
|
24
|
-
strokeDasharray: "4,4",
|
|
25
|
-
stroke: u.defaults.BORDER_GRAY,
|
|
26
|
-
fill: "none"
|
|
27
|
-
}, `point-${s}-${c}-${n}`) : /* @__PURE__ */ f(e, { children: [/* @__PURE__ */ d(p, {
|
|
28
|
-
data: [{
|
|
29
|
-
x: h,
|
|
30
|
-
y: g
|
|
31
|
-
}, {
|
|
32
|
-
x: h + r,
|
|
33
|
-
y: g - r
|
|
34
|
-
}],
|
|
35
|
-
className: "line",
|
|
36
|
-
x: (e) => e.x,
|
|
37
|
-
y: (e) => e.y,
|
|
38
|
-
strokeWidth: r / 5
|
|
39
|
-
}, `point-${s}-${c}-${n}-1`), /* @__PURE__ */ d(p, {
|
|
40
|
-
data: [{
|
|
41
|
-
x: h,
|
|
42
|
-
y: g - r
|
|
43
|
-
}, {
|
|
44
|
-
x: h + r,
|
|
45
|
-
y: g
|
|
46
|
-
}],
|
|
47
|
-
x: (e) => e.x,
|
|
48
|
-
y: (e) => e.y,
|
|
49
|
-
strokeWidth: r / 5,
|
|
50
|
-
className: "line"
|
|
51
|
-
}, `point-${s}-${c}-${n}-2`)] });
|
|
52
|
-
};
|
|
53
|
-
m.propTypes = {
|
|
54
|
-
index: s.number,
|
|
55
|
-
pointDiameter: s.number,
|
|
56
|
-
barX: s.number,
|
|
57
|
-
barWidth: s.number,
|
|
58
|
-
pointHeight: s.number,
|
|
59
|
-
value: s.number,
|
|
60
|
-
label: s.string,
|
|
61
|
-
scale: s.object,
|
|
62
|
-
dottedOverline: s.bool
|
|
63
|
-
};
|
|
64
|
-
var h = class extends o.Component {
|
|
65
|
-
static propTypes = {
|
|
66
|
-
data: s.array,
|
|
67
|
-
onChange: s.func,
|
|
68
|
-
graphProps: l.GraphPropsType.isRequired
|
|
69
|
-
};
|
|
70
|
-
render() {
|
|
71
|
-
let e = this.props, { data: t, graphProps: r } = e, { scale: i = {}, size: o = {} } = r || {}, s = n(i.x, t, o.width, "linePlot");
|
|
72
|
-
return /* @__PURE__ */ d(a, {
|
|
73
|
-
...e,
|
|
74
|
-
xBand: s,
|
|
75
|
-
CustomBarElement: m
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}, g = () => ({
|
|
79
|
-
type: "linePlot",
|
|
80
|
-
Component: h,
|
|
81
|
-
name: "Line Plot"
|
|
82
|
-
});
|
|
83
|
-
//#endregion
|
|
84
|
-
export { g as default };
|
package/dist/tool-menu.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/charting/src/tool-menu.jsx
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare const MiniButton: {
|
|
12
|
-
(props: any): React.JSX.Element;
|
|
13
|
-
propTypes: {
|
|
14
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
15
|
-
className: PropTypes.Requireable<string>;
|
|
16
|
-
selected: PropTypes.Requireable<boolean>;
|
|
17
|
-
value: PropTypes.Requireable<string>;
|
|
18
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare class ToolMenu extends React.Component {
|
|
22
|
-
static propTypes: {
|
|
23
|
-
className: PropTypes.Requireable<string>;
|
|
24
|
-
addCategory: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
26
|
-
language: PropTypes.Requireable<string>;
|
|
27
|
-
};
|
|
28
|
-
static defaultProps: {};
|
|
29
|
-
render(): React.JSX.Element;
|
|
30
|
-
}
|
|
31
|
-
export default ToolMenu;
|
package/dist/utils.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/charting/src/utils.js
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
export declare const tickCount: (min: any, max: any, step: any) => number;
|
|
10
|
-
export declare const bounds: (area: any, domain: any, range: any) => {
|
|
11
|
-
left: number;
|
|
12
|
-
right: number;
|
|
13
|
-
top: number;
|
|
14
|
-
bottom: number;
|
|
15
|
-
};
|
|
16
|
-
export declare const point: (o: any) => import("@mapbox/point-geometry").default;
|
|
17
|
-
export declare const bandKey: (d: any, index: any) => string;
|
|
18
|
-
export declare const dataToXBand: any;
|
|
19
|
-
export declare const getTickValues: (prop?: {}) => any[];
|
|
20
|
-
export declare const getDomainAndRangeByChartType: (domain: any, range: any, chartType: any) => {
|
|
21
|
-
domain: any;
|
|
22
|
-
range: any;
|
|
23
|
-
};
|
|
24
|
-
export declare const getGridLinesAndAxisByChartType: (range: any, chartType: any) => {
|
|
25
|
-
verticalLines: undefined;
|
|
26
|
-
horizontalLines: any[];
|
|
27
|
-
leftAxis: boolean;
|
|
28
|
-
} | {
|
|
29
|
-
verticalLines: never[];
|
|
30
|
-
horizontalLines: any[];
|
|
31
|
-
leftAxis: boolean;
|
|
32
|
-
};
|
|
33
|
-
export declare const getRotateAngle: (fontSize: any, height: any) => 0 | 25;
|
|
34
|
-
export declare const getTopPadding: (barWidth: any) => 0 | 50 | 30 | 15;
|
|
35
|
-
export declare const getScale: (width: any) => {
|
|
36
|
-
scale: number;
|
|
37
|
-
deltay: number;
|
|
38
|
-
};
|
|
39
|
-
export declare const getAdjustedX: (width: any, scaleValue: any) => number;
|
package/dist/utils.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import e from "./node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/band.js";
|
|
2
|
-
import t from "./node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/point.js";
|
|
3
|
-
import { utils as n } from "@pie-lib/plot";
|
|
4
|
-
n.tickCount, n.bounds, n.point;
|
|
5
|
-
var r = (e, t) => `${t}-${e.label || "-"}`, i = (n, i, a, o) => {
|
|
6
|
-
let s = a || 400, c = i && i.length ? i.map(r) : ["default"];
|
|
7
|
-
switch (o) {
|
|
8
|
-
case "bar":
|
|
9
|
-
case "dotPlot":
|
|
10
|
-
case "linePlot": return e({
|
|
11
|
-
range: [0, s],
|
|
12
|
-
domain: c,
|
|
13
|
-
padding: .2
|
|
14
|
-
});
|
|
15
|
-
case "histogram": return e({
|
|
16
|
-
range: [0, s],
|
|
17
|
-
domain: c,
|
|
18
|
-
padding: 0
|
|
19
|
-
});
|
|
20
|
-
case "lineCross":
|
|
21
|
-
case "lineDot": return t({
|
|
22
|
-
domain: c,
|
|
23
|
-
range: [0, s]
|
|
24
|
-
});
|
|
25
|
-
default: return e({
|
|
26
|
-
range: [0, s],
|
|
27
|
-
domain: c,
|
|
28
|
-
padding: 0
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}, a = (e = {}) => {
|
|
32
|
-
let t = [], n = e.min;
|
|
33
|
-
for (; n <= e.max;) t.push(n), n = Math.round((n + e.step) * 1e4) / 1e4;
|
|
34
|
-
return t;
|
|
35
|
-
}, o = (e, t, n) => {
|
|
36
|
-
let { step: r, labelStep: i, min: a, max: o } = t || {};
|
|
37
|
-
switch (a ||= 0, (!o || o < 0) && (o = t.min + 1), r ||= i || 1, (!i || isNaN(i) && r) && (i = r || 1), t.max = o, n) {
|
|
38
|
-
case "dotPlot":
|
|
39
|
-
case "linePlot": {
|
|
40
|
-
let n = Math.round(a), r = Math.round(o);
|
|
41
|
-
return {
|
|
42
|
-
domain: {
|
|
43
|
-
...e,
|
|
44
|
-
step: 1,
|
|
45
|
-
labelStep: 1,
|
|
46
|
-
min: 0,
|
|
47
|
-
max: 1
|
|
48
|
-
},
|
|
49
|
-
range: {
|
|
50
|
-
...t,
|
|
51
|
-
min: n,
|
|
52
|
-
max: n === r ? n + 1 : r,
|
|
53
|
-
labelStep: i,
|
|
54
|
-
step: 1
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
default: return {
|
|
59
|
-
domain: {
|
|
60
|
-
...e,
|
|
61
|
-
step: 1,
|
|
62
|
-
labelStep: 1,
|
|
63
|
-
min: 0,
|
|
64
|
-
max: 1
|
|
65
|
-
},
|
|
66
|
-
range: {
|
|
67
|
-
...t,
|
|
68
|
-
labelStep: i,
|
|
69
|
-
step: r
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}, s = (e, t) => {
|
|
74
|
-
switch (t) {
|
|
75
|
-
case "lineDot":
|
|
76
|
-
case "lineCross": return {
|
|
77
|
-
verticalLines: void 0,
|
|
78
|
-
horizontalLines: a(e),
|
|
79
|
-
leftAxis: !0
|
|
80
|
-
};
|
|
81
|
-
case "dotPlot":
|
|
82
|
-
case "linePlot": return {
|
|
83
|
-
verticalLines: [],
|
|
84
|
-
horizontalLines: [],
|
|
85
|
-
leftAxis: !1
|
|
86
|
-
};
|
|
87
|
-
default: return {
|
|
88
|
-
verticalLines: [],
|
|
89
|
-
horizontalLines: a(e),
|
|
90
|
-
leftAxis: !0
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}, c = (e, t) => t >= e * 2 ? 25 : 0, l = (e) => e < 30 ? 50 : e < 40 ? 30 : e < 60 ? 15 : 0, u = (e) => {
|
|
94
|
-
let t, n;
|
|
95
|
-
return e > 91 ? (t = 1.3, n = -55) : e > 45 ? (t = 1.1, n = -45) : e > 40 ? (t = .5 + (e - 34) * .02, n = -25) : e > 30 ? (t = .5 + (e - 34) * .02, n = -20) : (t = .5 * .98 ** (34 - e), n = -15), {
|
|
96
|
-
scale: t,
|
|
97
|
-
deltay: n
|
|
98
|
-
};
|
|
99
|
-
}, d = (e, t) => (e - 57 * t) / 2;
|
|
100
|
-
//#endregion
|
|
101
|
-
export { r as bandKey, i as dataToXBand, d as getAdjustedX, o as getDomainAndRangeByChartType, s as getGridLinesAndAxisByChartType, c as getRotateAngle, u as getScale, a as getTickValues, l as getTopPadding };
|