From ce30607d62672eb3153354b2e180bcd1e7d8f435 Mon Sep 17 00:00:00 2001 From: JY Kim Date: Wed, 4 Sep 2024 11:51:42 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=8A=88=208703=20=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=20(#452)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: usbsync --- src/components/widget/BillBoard.jsx | 24 +++++++++++++-------- src/components/widget/Chart/Bar.jsx | 2 +- src/components/widget/Chart/ScatterGrid.jsx | 4 ++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/components/widget/BillBoard.jsx b/src/components/widget/BillBoard.jsx index 980108be..77649c47 100644 --- a/src/components/widget/BillBoard.jsx +++ b/src/components/widget/BillBoard.jsx @@ -53,11 +53,13 @@ const BillBoard = (props) => { ...data, }; if (data.type) { - newTableData.type = getBillBoardType(data.type) + newTableData.type = data.type; + // newTableData.type = getBillBoardType(data.type); } if (data.types) { Object.keys(data.types).forEach((key) => { - newTableData.types[key] = getBillBoardType(data.types[key]); + newTableData.types[key] = data.types[key]; + // newTableData.types[key] = getBillBoardType(data.types[key]); }); } @@ -81,9 +83,7 @@ const BillBoard = (props) => {
-
- {title} -
+
{title}
{ />
-
-
+
+
@@ -130,6 +136,6 @@ const BillBoard = (props) => {
); -} +}; -export default pure(BillBoard); \ No newline at end of file +export default pure(BillBoard); diff --git a/src/components/widget/Chart/Bar.jsx b/src/components/widget/Chart/Bar.jsx index dc04b704..a3fe3a97 100644 --- a/src/components/widget/Chart/Bar.jsx +++ b/src/components/widget/Chart/Bar.jsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react'; -import bb, { bar } from 'billboard.js'; +import bb from 'billboard.js'; import Theme from '@utils/Theme'; import '@assets/entry/scss/widget/insight.css'; import { GRAPH_COLOR } from '@constants/dataAnalytics'; diff --git a/src/components/widget/Chart/ScatterGrid.jsx b/src/components/widget/Chart/ScatterGrid.jsx index b77c5256..76550a02 100644 --- a/src/components/widget/Chart/ScatterGrid.jsx +++ b/src/components/widget/Chart/ScatterGrid.jsx @@ -1,6 +1,6 @@ import { useRef, useEffect } from 'react'; import { corr } from '@utils/dataAnalytics'; -import bb, { scatter } from 'billboard.js'; +import bb from 'billboard.js'; import '@assets/entry/scss/widget/insight.css'; import Theme from '@utils/Theme'; import _unzip from 'lodash/unzip'; @@ -17,7 +17,7 @@ const ScatterChart = ({ columns, id = 'scatter_matrix', size, zoomIn, opacity }) columns[1][0] += 'x'; } bb.generate({ - data: { columns, type: scatter(), xs: { [columns[0][0]]: columns[1][0] } }, + data: { columns, type: 'scatter', xs: { [columns[0][0]]: columns[1][0] } }, bindto: chartRef.current, axis: { x: { tick: { text: { show: false }, count: 4, padding: 0 } },