mirror of https://github.com/buster-so/buster.git
rip out render type
This commit is contained in:
parent
785b85bd35
commit
ceea893188
|
@ -13,6 +13,6 @@ fast:
|
|||
build-storybook:
|
||||
npm run build-storybook
|
||||
|
||||
start-storybook:
|
||||
storybook:
|
||||
npm run start-storybook
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@faker-js/faker": "^9.5.1",
|
||||
"@fluentui/react-context-selector": "^9.1.72",
|
||||
"@manufac/echarts-simple-transform": "^2.0.11",
|
||||
"@million/lint": "^1.0.14",
|
||||
"@monaco-editor/react": "^4.7.0",
|
||||
"@radix-ui/react-avatar": "^1.1.3",
|
||||
|
@ -43,8 +42,8 @@
|
|||
"@supabase/ssr": "^0.5.2",
|
||||
"@supabase/supabase-js": "^2.49.1",
|
||||
"@tailwindcss/forms": "^0.5.10",
|
||||
"@tanstack/react-query": "^5.66.11",
|
||||
"@tanstack/react-query-devtools": "^5.66.11",
|
||||
"@tanstack/react-query": "^5.67.1",
|
||||
"@tanstack/react-query-devtools": "^5.67.1",
|
||||
"@vercel/speed-insights": "^1.2.0",
|
||||
"ahooks": "^3.8.4",
|
||||
"antd": "5.23.3",
|
||||
|
@ -70,13 +69,9 @@
|
|||
"dayjs": "^1.11.13",
|
||||
"dom-to-image": "^2.6.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"echarts": "^5.6.0",
|
||||
"echarts-for-react": "^3.0.2",
|
||||
"echarts-simple-transform": "^1.0.0",
|
||||
"echarts-stat": "^1.2.0",
|
||||
"email-validator": "^2.0.4",
|
||||
"font-color-contrast": "^11.1.0",
|
||||
"framer-motion": "^12.4.7",
|
||||
"framer-motion": "^12.4.9",
|
||||
"html2canvas": "^1.4.1",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jspdf": "^3.0.0",
|
||||
|
@ -93,7 +88,7 @@
|
|||
"patternomaly": "^1.3.2",
|
||||
"pluralize": "^8.0.0",
|
||||
"posthog-js": "*",
|
||||
"prettier": "^3.5.2",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
"react": "^18",
|
||||
"react-chartjs-2": "^5.3.0",
|
||||
|
@ -118,12 +113,12 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@chromatic-com/storybook": "^3.2.5",
|
||||
"@storybook/addon-essentials": "^8.6.2",
|
||||
"@storybook/addon-interactions": "^8.6.2",
|
||||
"@storybook/blocks": "^8.6.2",
|
||||
"@storybook/nextjs": "^8.6.2",
|
||||
"@storybook/react": "^8.6.2",
|
||||
"@storybook/test": "^8.6.2",
|
||||
"@storybook/addon-essentials": "^8.6.3",
|
||||
"@storybook/addon-interactions": "^8.6.3",
|
||||
"@storybook/blocks": "^8.6.3",
|
||||
"@storybook/nextjs": "^8.6.3",
|
||||
"@storybook/react": "^8.6.3",
|
||||
"@storybook/test": "^8.6.3",
|
||||
"@tailwindcss/postcss": "^4.0.9",
|
||||
"@tanstack/eslint-plugin-query": "^5.66.1",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
|
|
|
@ -124,7 +124,6 @@ export default function ChartjsFixedLine() {
|
|||
columnSettings={columnSettings}
|
||||
metricColumnId="sales"
|
||||
columnMetadata={columnMetadata}
|
||||
renderType="chartjs"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -168,7 +168,6 @@ export default function ChartJS() {
|
|||
pieDisplayLabelAs={displayLabelAs}
|
||||
pieShowInnerLabel={true}
|
||||
showLegendHeadline={'average'}
|
||||
renderType="chartjs"
|
||||
showLegend={true}
|
||||
yAxisStartAxisAtZero={yAxisStartAxisAtZero}
|
||||
yAxisScaleType={yAxisScaleType}
|
||||
|
|
|
@ -209,7 +209,6 @@ export default function ChartJS() {
|
|||
pieDisplayLabelAs={displayLabelAs}
|
||||
pieShowInnerLabel={true}
|
||||
showLegendHeadline={'average'}
|
||||
renderType="chartjs"
|
||||
showLegend={true}
|
||||
yAxisStartAxisAtZero={yAxisStartAxisAtZero}
|
||||
yAxisScaleType={yAxisScaleType}
|
||||
|
|
|
@ -45,7 +45,6 @@ export const BusterChart: React.FC<BusterChartProps> = React.memo(
|
|||
editable,
|
||||
selectedChartType,
|
||||
columnLabelFormats = DEFAULT_CHART_CONFIG.columnLabelFormats,
|
||||
renderType = 'chartjs',
|
||||
...props
|
||||
}) => {
|
||||
const isTable = selectedChartType === ChartType.Table;
|
||||
|
@ -132,7 +131,6 @@ export const BusterChart: React.FC<BusterChartProps> = React.memo(
|
|||
|
||||
const chartProps: BusterChartRenderComponentProps = {
|
||||
...DEFAULT_CHART_CONFIG,
|
||||
renderType,
|
||||
data,
|
||||
onChartMounted,
|
||||
onInitialAnimationEnd: onInitialAnimationEndPreflight,
|
||||
|
|
|
@ -8,7 +8,6 @@ import { BusterChartJS } from './BusterChartJS';
|
|||
import { useDatasetOptions } from './chartHooks';
|
||||
|
||||
export const BusterChartComponent: React.FC<BusterChartRenderComponentProps> = ({
|
||||
renderType,
|
||||
data: dataProp,
|
||||
barSortBy,
|
||||
pieMinimumSlicePercentage,
|
||||
|
@ -60,9 +59,5 @@ export const BusterChartComponent: React.FC<BusterChartRenderComponentProps> = (
|
|||
]
|
||||
);
|
||||
|
||||
if (renderType === 'chartjs') {
|
||||
return <BusterChartJS {...chartProps} />;
|
||||
}
|
||||
|
||||
return <></>;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,6 @@ export interface BusterChartTypeComponentProps
|
|||
extends Omit<
|
||||
Required<BusterChartComponentProps>,
|
||||
| 'data'
|
||||
| 'renderType'
|
||||
| 'loading'
|
||||
| 'showLegend'
|
||||
| 'showLegendHeadline'
|
||||
|
@ -21,7 +20,7 @@ export interface BusterChartTypeComponentProps
|
|||
export interface BusterChartComponentProps
|
||||
extends Omit<
|
||||
Required<BusterChartRenderComponentProps>,
|
||||
'renderType' | 'selectedAxis' | 'barSortBy' | 'trendlines' | 'data'
|
||||
'selectedAxis' | 'barSortBy' | 'trendlines' | 'data'
|
||||
>,
|
||||
ReturnType<typeof useDatasetOptions> {
|
||||
selectedAxis: ChartEncodes;
|
||||
|
|
|
@ -15,5 +15,4 @@ export type BusterChartProps = {
|
|||
editable?: boolean;
|
||||
onInitialAnimationEnd?: () => void;
|
||||
onChartMounted?: (chart?: any) => void;
|
||||
renderType?: 'echart' | 'chartjs';
|
||||
} & BusterChartConfigProps;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import { TagInput } from './InputTagInput';
|
||||
import { useState } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
const meta: Meta<typeof TagInput> = {
|
||||
title: 'UI/Inputs/TagInput',
|
||||
|
|
Loading…
Reference in New Issue