sea-chart 0.0.33 → 0.0.34
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/dist/settings/time-comparison-settings/style-settings.js +0 -1
- package/dist/utils/sql/chart-data-sql.js +4 -5
- package/dist/view/wrapper/bar-group.js +0 -1
- package/dist/view/wrapper/completeness.js +1 -8
- package/dist/view/wrapper/heat-map.js +1 -1
- package/dist/view/wrapper/horizontal-component.js +1 -1
- package/dist/view/wrapper/line.js +0 -2
- package/dist/view/wrapper/scatter.js +1 -1
- package/dist/view/wrapper/treemap.js +1 -1
- package/package.json +1 -1
|
@@ -91,7 +91,6 @@ const StyleSettings = _ref => {
|
|
|
91
91
|
});
|
|
92
92
|
}, [chart, onChange]);
|
|
93
93
|
const onDisplayValueChange = useCallback(update => {
|
|
94
|
-
console.log('update', update);
|
|
95
94
|
onChange && onChange(update);
|
|
96
95
|
}, [onChange]);
|
|
97
96
|
const onDisplayPercentageIncreaseChange = useCallback(event => {
|
|
@@ -314,23 +314,22 @@ class ChartDataSQL {
|
|
|
314
314
|
x_axis_date_granularity,
|
|
315
315
|
x_axis_geolocation_granularity,
|
|
316
316
|
y_axis_summary_type,
|
|
317
|
-
|
|
318
|
-
y_axis_summary_method
|
|
319
|
-
x_axis_include_empty_cells
|
|
317
|
+
y_axis_summary_column_key,
|
|
318
|
+
y_axis_summary_method
|
|
320
319
|
} = this.chart;
|
|
321
320
|
const groupby_column = this._get_column_by_key(x_axis_column_key);
|
|
322
321
|
if (!groupby_column) {
|
|
323
322
|
this.error = 'Group_by_column_not_found';
|
|
324
323
|
return '';
|
|
325
324
|
}
|
|
326
|
-
this._update_filter_sql(
|
|
325
|
+
this._update_filter_sql(true, groupby_column);
|
|
327
326
|
const groupby_column_name = this._chart_column_name_to_sql(groupby_column, {
|
|
328
327
|
'date_granularity': x_axis_date_granularity,
|
|
329
328
|
'geolocation_granularity': x_axis_geolocation_granularity
|
|
330
329
|
});
|
|
331
330
|
let summary_column_name = this._summary_column_2_sql('COUNT', groupby_column);
|
|
332
331
|
if (y_axis_summary_type === CHART_SUMMARY_TYPE.ADVANCED) {
|
|
333
|
-
const summary_column = this._get_column_by_key(
|
|
332
|
+
const summary_column = this._get_column_by_key(y_axis_summary_column_key);
|
|
334
333
|
if (!summary_column) {
|
|
335
334
|
this.error = 'Summary_column_not_found';
|
|
336
335
|
return '';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import classnames from 'classnames';
|
|
2
2
|
import React, { useEffect, useRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { maxBy } from 'lodash-es';
|
|
4
4
|
import { BaseUtils, isBoolean } from '../../utils';
|
|
5
5
|
import intl from '../../intl';
|
|
6
6
|
import { CHART_STYLE_COLORS, CHART_TYPE } from '../../constants';
|
|
@@ -15,12 +15,6 @@ export default function Completeness(props) {
|
|
|
15
15
|
chartRef.current = chartComponent;
|
|
16
16
|
}
|
|
17
17
|
const currentChart = chartRef.current;
|
|
18
|
-
const handleReize = debounce(() => {
|
|
19
|
-
currentChart.chart.destroy();
|
|
20
|
-
createChart();
|
|
21
|
-
drawChart();
|
|
22
|
-
}, 300);
|
|
23
|
-
window.addEventListener('resize', handleReize);
|
|
24
18
|
let chartPaddingTop;
|
|
25
19
|
// avoid closure trap
|
|
26
20
|
function createChart() {
|
|
@@ -156,7 +150,6 @@ export default function Completeness(props) {
|
|
|
156
150
|
drawChart();
|
|
157
151
|
return () => {
|
|
158
152
|
currentChart.chart.destroy();
|
|
159
|
-
window.removeEventListener('resize', handleReize);
|
|
160
153
|
};
|
|
161
154
|
}, [props]);
|
|
162
155
|
const {
|
|
@@ -5,11 +5,11 @@ import dayjs from 'dayjs';
|
|
|
5
5
|
import weekOfYear from 'dayjs/plugin/weekOfYear';
|
|
6
6
|
import { getTableById, getTableColumnByKey, getNumberDisplayString } from 'dtable-utils';
|
|
7
7
|
import { registerShape, getRectWithCornerRadius } from '../../utils/custom-g2';
|
|
8
|
-
import ChartComponent from './chart-component';
|
|
9
8
|
import intl from '../../intl';
|
|
10
9
|
import { BaseUtils } from '../../utils';
|
|
11
10
|
import { CHART_SUMMARY_TYPE, TITLE_AMOUNT, DEFAULT_GRID_SIZE, DEFAULT_GRID_DISTANCE, DEFAULT_NUMBER_FORMAT_OBJECT, MONTH_MIRROR } from '../../constants';
|
|
12
11
|
import { FILL_BORDER_COLOR_MAP, COLOR_OPTIONS } from '../../constants/style';
|
|
12
|
+
import ChartComponent from './chart-component';
|
|
13
13
|
dayjs.extend(weekOfYear);
|
|
14
14
|
class HeatMap extends ChartComponent {
|
|
15
15
|
constructor(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
2
|
-
import ChartComponent from './chart-component';
|
|
3
2
|
import { CHART_SUMMARY_TYPE, LABEL_POSITION_TYPE } from '../../constants';
|
|
4
3
|
import intl from '../../intl';
|
|
4
|
+
import ChartComponent from './chart-component';
|
|
5
5
|
export default class HorizontalComponent extends ChartComponent {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
5
4
|
import { BaseUtils, isFunction } from '../../utils';
|
|
6
5
|
import intl from '../../intl';
|
|
7
6
|
import { CHART_LINE_TYPES, CHART_SUMMARY_SHOW, CHART_SUMMARY_TYPE } from '../../constants';
|
|
@@ -55,7 +54,6 @@ class Line extends ChartComponent {
|
|
|
55
54
|
y_axis_show_value,
|
|
56
55
|
label_font_size,
|
|
57
56
|
line_type,
|
|
58
|
-
y_axis_column_key,
|
|
59
57
|
y_axis_summary_type,
|
|
60
58
|
y_axis_summary_method
|
|
61
59
|
} = chart.config;
|
|
@@ -6,8 +6,8 @@ import { getEllipsisText } from '@antv/g2/esm/util/text';
|
|
|
6
6
|
import { CHART_SUMMARY_TYPE, EMPTY_NAME } from '../../constants';
|
|
7
7
|
import { BaseUtils, isFunction } from '../../utils';
|
|
8
8
|
import { registerGeometryLabelLayout } from '../../utils/custom-g2';
|
|
9
|
-
import ChartComponent from './chart-component';
|
|
10
9
|
import intl from '../../intl';
|
|
10
|
+
import ChartComponent from './chart-component';
|
|
11
11
|
class Treemap extends ChartComponent {
|
|
12
12
|
constructor(props) {
|
|
13
13
|
super(props);
|