An open source alternative to Tableau. Embeddable visual analytic
TypeScript bidatadata-analysisdata-miningdata-visualizationedak6skanarieslow-codepivot-tablereacttableautableau-alternativetypescriptvegavega-litevisualization
feat(): default theme
kyusho91da5883cf37
diff --git a/packages/graphic-walker/src/App.tsx b/packages/graphic-walker/src/App.tsxindex 19b4a6bd..cdc13416 100644--- a/packages/graphic-walker/src/App.tsx+++ b/packages/graphic-walker/src/App.tsx@@ -36,7 +36,8 @@ export interface IGWProps {* auto parse field key into a safe string. default is true*/fieldKeyGuard?: boolean;- themeKey?: 'vega' | 'antv';+ /** @default "vega" */+ themeKey?: 'vega' | 'g2';}const App: React.FC<IGWProps> = (props) => {@@ -48,7 +49,7 @@ const App: React.FC<IGWProps> = (props) => {i18nResources,hideDataSourceConfig,fieldKeyGuard = true,- themeKey = 'antv',+ themeKey = 'vega',} = props;const { commonStore, vizStore } = useGlobalStore();const [insightReady, setInsightReady] = useState<boolean>(true);diff --git a/packages/graphic-walker/src/main.tsx b/packages/graphic-walker/src/main.tsxindex aef3f60f..62c9c4c3 100644--- a/packages/graphic-walker/src/main.tsx+++ b/packages/graphic-walker/src/main.tsx@@ -9,7 +9,7 @@ inject();ReactDOM.render(<React.StrictMode>- <GraphicWalker />+ <GraphicWalker themeKey="g2" /></React.StrictMode>,document.getElementById("root"));diff --git a/packages/graphic-walker/src/renderer/index.tsx b/packages/graphic-walker/src/renderer/index.tsxindex c416bdfd..cb389423 100644--- a/packages/graphic-walker/src/renderer/index.tsx+++ b/packages/graphic-walker/src/renderer/index.tsx@@ -7,7 +7,7 @@ import { useGlobalStore } from '../store';import ReactVega, { IReactVegaHandler } from '../vis/react-vega';-const ReactiveRenderer = forwardRef<IReactVegaHandler, { themeKey?: 'vega' | 'antv' }>(function ReactiveRenderer ({ themeKey }, ref) {+const ReactiveRenderer = forwardRef<IReactVegaHandler, { themeKey?: 'vega' | 'g2' }>(function ReactiveRenderer ({ themeKey }, ref) {const { vizStore, commonStore } = useGlobalStore();const { draggableFieldState, visualConfig } = vizStore;const { geoms, interactiveScale, defaultAggregated, stack, showActions, size, exploration } = visualConfig;diff --git a/packages/graphic-walker/src/vis/react-vega.tsx b/packages/graphic-walker/src/vis/react-vega.tsxindex 8d22ff2f..55eb81ed 100644--- a/packages/graphic-walker/src/vis/react-vega.tsx+++ b/packages/graphic-walker/src/vis/react-vega.tsx@@ -49,7 +49,7 @@ interface ReactVegaProps {selectEncoding: SingleViewProps['selectEncoding'];brushEncoding: SingleViewProps['brushEncoding'];/** @default "vega" */- themeKey?: 'vega' | 'antv';+ themeKey?: 'vega' | 'g2';}const NULL_FIELD: IViewField = {dragId: '',diff --git a/packages/graphic-walker/src/vis/theme.ts b/packages/graphic-walker/src/vis/theme.tsindex 9aa21136..9fa09c9e 100644--- a/packages/graphic-walker/src/vis/theme.ts+++ b/packages/graphic-walker/src/vis/theme.ts@@ -122,5 +122,5 @@ export const AntVTheme = {export const builtInThemes: { [themeKey: string]: { light: any; dark: any; } } = {vega: VegaTheme,- antv: AntVTheme,+ g2: AntVTheme,};