@pie-lib/charting 6.1.1-next.0 → 6.2.0-next.0
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/lib/actions-button.js +0 -5
- package/lib/actions-button.js.map +1 -1
- package/lib/axes.js +0 -23
- package/lib/axes.js.map +1 -1
- package/lib/bars/bar.js +0 -2
- package/lib/bars/bar.js.map +1 -1
- package/lib/bars/common/bars.js +0 -13
- package/lib/bars/common/bars.js.map +1 -1
- package/lib/bars/common/correct-check-icon.js +0 -1
- package/lib/bars/common/correct-check-icon.js.map +1 -1
- package/lib/bars/histogram.js +0 -2
- package/lib/bars/histogram.js.map +1 -1
- package/lib/chart-setup.js +0 -19
- package/lib/chart-setup.js.map +1 -1
- package/lib/chart-type.js +0 -1
- package/lib/chart-type.js.map +1 -1
- package/lib/chart-types.js +0 -1
- package/lib/chart-types.js.map +1 -1
- package/lib/chart.js +2 -18
- package/lib/chart.js.map +1 -1
- package/lib/common/correctness-indicators.js +0 -4
- package/lib/common/correctness-indicators.js.map +1 -1
- package/lib/common/drag-handle.js +0 -1
- package/lib/common/drag-handle.js.map +1 -1
- package/lib/common/drag-icon.js +0 -2
- package/lib/common/drag-icon.js.map +1 -1
- package/lib/common/styles.js +0 -1
- package/lib/common/styles.js.map +1 -1
- package/lib/grid.js +0 -4
- package/lib/grid.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/key-legend.js +0 -1
- package/lib/key-legend.js.map +1 -1
- package/lib/line/common/drag-handle.js +0 -2
- package/lib/line/common/drag-handle.js.map +1 -1
- package/lib/line/common/line.js +2 -19
- package/lib/line/common/line.js.map +1 -1
- package/lib/line/line-cross.js +0 -16
- package/lib/line/line-cross.js.map +1 -1
- package/lib/line/line-dot.js +0 -2
- package/lib/line/line-dot.js.map +1 -1
- package/lib/mark-label.js +0 -21
- package/lib/mark-label.js.map +1 -1
- package/lib/plot/common/plot.js +0 -12
- package/lib/plot/common/plot.js.map +1 -1
- package/lib/plot/dot.js +0 -3
- package/lib/plot/dot.js.map +1 -1
- package/lib/plot/line.js +0 -3
- package/lib/plot/line.js.map +1 -1
- package/lib/tool-menu.js +0 -11
- package/lib/tool-menu.js.map +1 -1
- package/lib/utils.js +0 -12
- package/lib/utils.js.map +1 -1
- package/package.json +12 -9
- package/src/__tests__/actions-button.test.jsx +280 -0
- package/src/__tests__/axes.test.jsx +557 -16
- package/src/__tests__/chart-setup.test.jsx +495 -10
- package/src/__tests__/chart.test.jsx +1 -1
- package/src/__tests__/grid.test.jsx +2 -2
- package/src/__tests__/key-legend.test.jsx +223 -0
- package/src/__tests__/tool-menu.test.jsx +522 -0
- package/src/__tests__/utils.js +1 -1
- package/src/axes.jsx +10 -7
- package/src/bars/common/bars.jsx +32 -50
- package/src/chart-setup.jsx +6 -9
- package/src/chart-type.js +3 -6
- package/src/chart.jsx +2 -2
- package/src/common/__tests__/correctness-indicators.test.jsx +720 -0
- package/src/common/__tests__/drag-handle.test.jsx +0 -1
- package/src/common/correctness-indicators.jsx +8 -13
- package/src/common/drag-handle.jsx +2 -12
- package/src/grid.jsx +1 -1
- package/src/line/__tests__/line-cross.test.jsx +423 -1
- package/src/line/__tests__/utils.js +1 -1
- package/src/line/common/__tests__/drag-handle.test.jsx +1 -2
- package/src/line/common/drag-handle.jsx +2 -11
- package/src/line/common/line.jsx +2 -2
- package/src/line/line-cross.js +7 -13
- package/src/mark-label.jsx +3 -3
- package/src/plot/__tests__/dot.test.jsx +300 -1
- package/src/plot/__tests__/line.test.jsx +331 -1
- package/src/plot/common/plot.jsx +14 -13
- package/src/utils.js +0 -1
- package/NEXT.CHANGELOG.json +0 -16
package/src/chart-setup.jsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { color } from '@pie-lib/render-ui';
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import ChartType from './chart-type';
|
|
7
|
-
import { NumberTextFieldCustom } from '@pie-lib/config-ui';
|
|
8
|
-
import { AlertDialog } from '@pie-lib/config-ui';
|
|
7
|
+
import { AlertDialog, NumberTextFieldCustom } from '@pie-lib/config-ui';
|
|
9
8
|
|
|
10
9
|
export const resetValues = (data, updateModel, range, onChange, model) => {
|
|
11
10
|
(data || []).forEach((d) => {
|
|
@@ -129,12 +128,10 @@ const ConfigureChartPanel = (props) => {
|
|
|
129
128
|
);
|
|
130
129
|
|
|
131
130
|
const handleAlertDialog = (openStatus) => {
|
|
132
|
-
setAlertDialog(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}),
|
|
137
|
-
);
|
|
131
|
+
setAlertDialog((prevState) => ({
|
|
132
|
+
...prevState,
|
|
133
|
+
open: openStatus,
|
|
134
|
+
}));
|
|
138
135
|
|
|
139
136
|
setOpen(openStatus);
|
|
140
137
|
};
|
package/src/chart-type.js
CHANGED
|
@@ -4,6 +4,7 @@ import MenuItem from '@mui/material/MenuItem';
|
|
|
4
4
|
import FormControl from '@mui/material/FormControl';
|
|
5
5
|
import InputLabel from '@mui/material/InputLabel';
|
|
6
6
|
import { Select } from '@mui/material';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
|
|
8
9
|
const StyledContainer = styled('div')(() => ({
|
|
9
10
|
width: '160px',
|
|
@@ -17,14 +18,10 @@ const StyledInputLabel = styled(InputLabel)(() => ({
|
|
|
17
18
|
backgroundColor: 'transparent',
|
|
18
19
|
}));
|
|
19
20
|
|
|
20
|
-
import PropTypes from 'prop-types';
|
|
21
|
-
|
|
22
21
|
const ChartType = ({ onChange, value, availableChartTypes, chartTypeLabel }) => (
|
|
23
22
|
<StyledContainer>
|
|
24
23
|
<StyledFormControl variant={'outlined'}>
|
|
25
|
-
<StyledInputLabel id="type-helper-label">
|
|
26
|
-
{chartTypeLabel}
|
|
27
|
-
</StyledInputLabel>
|
|
24
|
+
<StyledInputLabel id="type-helper-label">{chartTypeLabel}</StyledInputLabel>
|
|
28
25
|
<Select
|
|
29
26
|
labelId="type-helper-label"
|
|
30
27
|
id="type-helper-label-select"
|
|
@@ -32,7 +29,7 @@ const ChartType = ({ onChange, value, availableChartTypes, chartTypeLabel }) =>
|
|
|
32
29
|
value={value}
|
|
33
30
|
onChange={onChange}
|
|
34
31
|
label={chartTypeLabel}
|
|
35
|
-
MenuProps={{transitionDuration: { enter: 225, exit: 195 }}}
|
|
32
|
+
MenuProps={{ transitionDuration: { enter: 225, exit: 195 } }}
|
|
36
33
|
>
|
|
37
34
|
{availableChartTypes?.histogram && <MenuItem value={'histogram'}>{availableChartTypes.histogram}</MenuItem>}
|
|
38
35
|
{availableChartTypes?.bar && <MenuItem value={'bar'}>{availableChartTypes.bar}</MenuItem>}
|
package/src/chart.jsx
CHANGED
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import debug from 'debug';
|
|
5
|
-
import cloneDeep from 'lodash
|
|
5
|
+
import { cloneDeep } from 'lodash-es';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { createGraphProps, Root } from '@pie-lib/plot';
|
|
8
8
|
import { AlertDialog } from '@pie-lib/config-ui';
|
|
9
9
|
import ChartGrid from './grid';
|
|
10
10
|
import ChartAxes from './axes';
|