From a476d264ac17128b39fb7863a9de76c1808679de Mon Sep 17 00:00:00 2001 From: JY Kim Date: Tue, 16 Jul 2024 17:57:39 +0900 Subject: [PATCH] =?UTF-8?q?billboard=20=EC=B0=A8=ED=8A=B8=20type=20?= =?UTF-8?q?=EC=A3=BC=EC=9E=85=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?(#440)=20(#441)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: kim jeong yong --- package.json | 2 +- src/components/widget/Chart/Bar.jsx | 4 ++-- src/components/widget/Chart/Histogram.jsx | 4 ++-- src/components/widget/Chart/Line.jsx | 4 ++-- src/components/widget/Chart/Pie.jsx | 4 ++-- src/components/widget/Chart/Plotly.jsx | 2 +- src/components/widget/Chart/Scatter.jsx | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index db62de3b..3461d54b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@entrylabs/tool", - "version": "2.0.2", + "version": "2.0.3", "license": "MIT", "repository": { "type": "git", diff --git a/src/components/widget/Chart/Bar.jsx b/src/components/widget/Chart/Bar.jsx index 1c291d99..dc04b704 100644 --- a/src/components/widget/Chart/Bar.jsx +++ b/src/components/widget/Chart/Bar.jsx @@ -43,7 +43,7 @@ const Bar = ({ chart, table, size }) => { const theme = Theme.getStyle('popup'); const chartRef = useRef(null); const { id, xIndex = -1, order, categoryIndexes = [], type } = chart; - + useEffect(() => { if (!isDrawable(chart)) { return; @@ -66,7 +66,7 @@ const Bar = ({ chart, table, size }) => { }, data: { columns, - type: bar(), + type: 'bar', }, axis: { x: { diff --git a/src/components/widget/Chart/Histogram.jsx b/src/components/widget/Chart/Histogram.jsx index e2418f20..d6a7ae03 100644 --- a/src/components/widget/Chart/Histogram.jsx +++ b/src/components/widget/Chart/Histogram.jsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react'; -import bb, { areaStep } 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'; @@ -30,7 +30,7 @@ const Histogram = ({ chart, table, size }) => { data: { x: 'histogram_chart_x', columns: getHistogramChart(table, categoryIndexes, bin, boundary), - type: areaStep(), + type: 'area-step', }, axis: { x: { diff --git a/src/components/widget/Chart/Line.jsx b/src/components/widget/Chart/Line.jsx index 2777424a..997102b9 100644 --- a/src/components/widget/Chart/Line.jsx +++ b/src/components/widget/Chart/Line.jsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react'; -import bb, { line } 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'; @@ -64,7 +64,7 @@ const Line = ({ chart, table, size }) => { }, data: { columns, - type: line(), + type: 'line', }, axis: { x: { diff --git a/src/components/widget/Chart/Pie.jsx b/src/components/widget/Chart/Pie.jsx index ae0371f7..9600a418 100644 --- a/src/components/widget/Chart/Pie.jsx +++ b/src/components/widget/Chart/Pie.jsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react'; -import bb, { pie } 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'; @@ -32,7 +32,7 @@ const Pie = ({ table, chart, size }) => { pieChart[0], ...pieChart.slice(1).map((value, index) => [index, value[1]]), ], - type: pie(), + type: 'pie', }, axis: { x: { diff --git a/src/components/widget/Chart/Plotly.jsx b/src/components/widget/Chart/Plotly.jsx index 864d7393..8212caa0 100644 --- a/src/components/widget/Chart/Plotly.jsx +++ b/src/components/widget/Chart/Plotly.jsx @@ -1,4 +1,4 @@ -import { useState, useRef, useEffect, useCallback } from 'react'; +import { useState, useRef, useEffect } from 'react'; import Plotly from 'react-plotly.js'; import Theme from '@utils/Theme'; import { corr } from '@utils/dataAnalytics'; diff --git a/src/components/widget/Chart/Scatter.jsx b/src/components/widget/Chart/Scatter.jsx index 769c64b7..7c727a69 100644 --- a/src/components/widget/Chart/Scatter.jsx +++ b/src/components/widget/Chart/Scatter.jsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react'; -import bb, { scatter } from 'billboard.js'; +import bb from 'billboard.js'; import Theme from '@utils/Theme'; import '@assets/entry/scss/widget/insight.css'; import { GRAPH_COLOR, SCATTER_POINT_PATTERN } from '@constants/dataAnalytics'; @@ -41,7 +41,7 @@ const Scatter = ({ chart, table, size }) => { data: { xs: scatterXs(columns), columns, - type: scatter(), + type: 'scatter', }, axis: { x: {