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