Skip to content

Commit d547fec

Browse files
committed
산점도 행렬 축값 추가
1 parent eed58a0 commit d547fec

File tree

13 files changed

+420
-393
lines changed

13 files changed

+420
-393
lines changed

src/assets/entry/scss/components/_TableChart.scss

+283-142
Large diffs are not rendered by default.

src/components/editor/dataAnalytics/chart/ChartLayout.jsx

+9-21
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ const ChartLayout = () => {
8585
let height = root.innerHeight;
8686
if (zoomIn) {
8787
if (type === SCATTERGRID) {
88-
width = 600;
89-
height = 600;
88+
width = Math.max(width * 0.8, 600);
89+
height = width;
9090
} else {
9191
width = Math.max(width * 0.8, 600);
9292
height = (width * 3) / 4;
@@ -142,11 +142,6 @@ const ChartLayout = () => {
142142
{
143143
[theme.vertical]: !(categoryIndexes.length && isHorizontalLegend),
144144
[theme.horizontal]: categoryIndexes.length && isHorizontalLegend,
145-
[theme.scatter_matrix]: type === SCATTERGRID,
146-
[theme[`type_${categoryIndexes.length}`]]:
147-
type === SCATTERGRID &&
148-
categoryIndexes.length >= 2 &&
149-
categoryIndexes.length <= 6,
150145
},
151146
theme[type]
152147
)}
@@ -155,23 +150,16 @@ const ChartLayout = () => {
155150
{isDrawableHorizontalLegend ? (
156151
<HorizontalLegend table={table} chart={selectedChart} />
157152
) : null}
158-
<div
159-
style={{
153+
<Chart
154+
key={key}
155+
table={table}
156+
chart={chart[chartIndex]}
157+
size={{
160158
width: size.width,
161159
height: size.height,
162-
margin: 'auto',
163160
}}
164-
>
165-
<Chart
166-
key={key}
167-
table={table}
168-
chart={chart[chartIndex]}
169-
size={{
170-
width: size.width,
171-
height: size.height,
172-
}}
173-
/>
174-
</div>
161+
zoomIn
162+
/>
175163
{categoryIndexes.length && !isHorizontalLegend ? (
176164
<VerticalLegend table={table} chart={selectedChart} />
177165
) : null}

src/components/editor/dataAnalytics/chart/ScatterGrid.jsx

-177
This file was deleted.

src/components/editor/dataAnalytics/chart/properties/Legend.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ const Legend = ({ maximumSelectionLength, showSelectAll, checkBox }) => {
6868

6969
const handleOutsideClick = (checkItems) => {
7070
setShowDropdown(false);
71-
console.log('hihi');
7271
if (checkBox) {
7372
dispatch({
7473
type: 'SELECT_LEGEND_AXIS',

src/components/widget/Chart/Bar.jsx

+12-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,18 @@ const Bar = ({ chart, table, size }) => {
7979
legend: { show: false },
8080
bindto: chartRef.current,
8181
});
82-
}, []);
82+
}, [
83+
categoryIndexes,
84+
chart,
85+
id,
86+
order,
87+
size,
88+
table,
89+
theme.bg,
90+
theme.chart_tooltip,
91+
type,
92+
xIndex,
93+
]);
8394

8495
return (
8596
<div className={theme.chart_area}>

src/components/widget/Chart/Histogram.jsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,20 @@ const Histogram = ({ chart, table, size }) => {
101101
line: { step: { type: 'step-after' } },
102102
bindto: chartRef.current,
103103
});
104-
}, []);
104+
}, [
105+
bin,
106+
boundary,
107+
categoryIndexes,
108+
chart,
109+
id,
110+
size,
111+
table,
112+
theme.bull,
113+
theme.histogram_legend,
114+
theme.legend_list,
115+
theme.text,
116+
type,
117+
]);
105118

106119
return (
107120
<div className={theme.chart_area}>

src/components/widget/Chart/Line.jsx

+12-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,18 @@ const Line = ({ chart, table, size }) => {
7878
legend: { show: false },
7979
bindto: chartRef.current,
8080
});
81-
}, []);
81+
}, [
82+
categoryIndexes,
83+
chart,
84+
id,
85+
order,
86+
size,
87+
table,
88+
theme.bg,
89+
theme.chart_tooltip,
90+
type,
91+
xIndex,
92+
]);
8293

8394
return (
8495
<div className={theme.chart_area}>

src/components/widget/Chart/Pie.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const Pie = ({ table, chart, size }) => {
7676
legend: { show: false },
7777
bindto: chartRef.current,
7878
});
79-
}, []);
79+
}, [categoryIndexes, chart, id, size, table, theme.bg, theme.chart_tooltip, type, xIndex]);
8080

8181
return (
8282
<div className={theme.chart_area}>

src/components/widget/Chart/Scatter.jsx

+13-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Scatter = ({ chart, table, size }) => {
3333
grid: { x: { show: true }, y: { show: true } },
3434
size,
3535
point: {
36-
pattern: SCATTER_POINT_PATTERN,
36+
// pattern: SCATTER_POINT_PATTERN,
3737
opacity: 1,
3838
},
3939
color: {
@@ -103,7 +103,18 @@ const Scatter = ({ chart, table, size }) => {
103103
legend: { show: false },
104104
bindto: chartRef.current,
105105
});
106-
}, []);
106+
}, [
107+
categoryIndexes,
108+
chart,
109+
id,
110+
size,
111+
table,
112+
theme.bg,
113+
theme.chart_tooltip,
114+
type,
115+
xIndex,
116+
yIndex,
117+
]);
107118

108119
return (
109120
<div className={theme.chart_area}>

0 commit comments

Comments
 (0)