An open source alternative to Tableau. Embeddable visual analytic
TypeScript bidatadata-analysisdata-miningdata-visualizationedak6skanarieslow-codepivot-tablereacttableautableau-alternativetypescriptvegavega-litevisualization
fix: ux
islxyqwe3870fde20854
diff --git a/packages/graphic-walker/src/components/visualConfig/index.tsx b/packages/graphic-walker/src/components/visualConfig/index.tsxindex 62435e14..bda4f5cf 100644--- a/packages/graphic-walker/src/components/visualConfig/index.tsx+++ b/packages/graphic-walker/src/components/visualConfig/index.tsx@@ -1,7 +1,7 @@import { observer } from 'mobx-react-lite';import React, { useEffect, useState } from 'react';import { useGlobalStore } from '../../store';-import { NonPositionChannelConfigList,PositionChannelConfigList } from '../../config';+import { NonPositionChannelConfigList, PositionChannelConfigList } from '../../config';import Modal from '../modal';import { IVisualConfig } from '../../interfaces';@@ -15,14 +15,13 @@ const VisualConfigPanel: React.FC = (props) => {const { commonStore, vizStore } = useGlobalStore();const { showVisualConfigPanel } = commonStore;const { visualConfig } = vizStore;- const { coordSystem, geoms: [markType] } = visualConfig;+ const {+ coordSystem,+ geoms: [markType],+ } = visualConfig;const isChoropleth = coordSystem === 'geographic' && markType === 'choropleth';const { t } = useTranslation();- const formatConfigList: (keyof IVisualConfig['format'])[] = [- 'numberFormat',- 'timeFormat',- 'normalizedNumberFormat',- ];+ const formatConfigList: (keyof IVisualConfig['format'])[] = ['numberFormat', 'timeFormat', 'normalizedNumberFormat'];const [format, setFormat] = useState<IVisualConfig['format']>({numberFormat: visualConfig.format.numberFormat,timeFormat: visualConfig.format.timeFormat,@@ -63,11 +62,7 @@ const VisualConfigPanel: React.FC = (props) => {<h2 className="text-lg mb-4">{t('config.format')}</h2><p className="text-xs">{t(`config.formatGuidesDocs`)}:{' '}- <a- target="_blank"- className="underline text-blue-500"- href="https://github.com/d3/d3-format#locale_format"- >+ <a target="_blank" className="underline text-blue-500" href="https://github.com/d3/d3-format#locale_format">{t(`config.readHere`)}</a></p>@@ -89,9 +84,9 @@ const VisualConfigPanel: React.FC = (props) => {</div></div>))}- <h2 className="text-lg">{t('config.background')}</h2>+ <hr className='my-4' /><div className="my-2">- <label className="block text-xs font-medium leading-6">{t(`config.color`)}</label>+ <label className="block text-xs font-medium leading-6">{t('config.background')} {t(`config.color`)}</label><div className="mt-1"><inputtype="text"@@ -103,7 +98,7 @@ const VisualConfigPanel: React.FC = (props) => {/></div></div>- <h2 className="text-lg">{t('config.independence')}</h2>+ <label className="block text-xs font-medium leading-6">{t('config.independence')}</label><div className="my-2"><div className="flex space-x-6">{PositionChannelConfigList.map((pc) => (@@ -134,27 +129,27 @@ const VisualConfigPanel: React.FC = (props) => {))}</div></div>- <h2 className="text-lg">{t('config.zeroScale')}</h2>+ <label className="block text-xs font-medium leading-6">{t('config.misc')}</label><div className="my-2">- <Toggle- label={t(`config.zeroScale`)}- enabled={zeroScale}- onChange={(en) => {- setZeroScale(en);- }}- />- </div>- {isChoropleth && (- <div className="my-2">+ <div className="flex space-x-6"><Toggle- label="include unmatched choropleth in scale"- enabled={scaleIncludeUnmatchedChoropleth}+ label={t(`config.zeroScale`)}+ enabled={zeroScale}onChange={(en) => {- setScaleIncludeUnmatchedChoropleth(en);+ setZeroScale(en);}}/>+ {isChoropleth && (+ <Toggle+ label="include unmatched choropleth in scale"+ enabled={scaleIncludeUnmatchedChoropleth}+ onChange={(en) => {+ setScaleIncludeUnmatchedChoropleth(en);+ }}+ />+ )}</div>- )}+ </div><div className="mt-4"><PrimaryButtontext={t('actions.confirm')}diff --git a/packages/graphic-walker/src/locales/en-US.json b/packages/graphic-walker/src/locales/en-US.jsonindex eef10774..e3302245 100644--- a/packages/graphic-walker/src/locales/en-US.json+++ b/packages/graphic-walker/src/locales/en-US.json@@ -10,6 +10,7 @@"x": "x-Axis","y": "y-Axis","zeroScale": "Zero Scale",+ "misc": "Misc","formatGuidesDocs": "Format guides docs","readHere": "read here"},diff --git a/packages/graphic-walker/src/locales/ja-JP.json b/packages/graphic-walker/src/locales/ja-JP.jsonindex 7865f0a1..f9acfef4 100644--- a/packages/graphic-walker/src/locales/ja-JP.json+++ b/packages/graphic-walker/src/locales/ja-JP.json@@ -10,6 +10,7 @@"x": "x軸","y": "y軸","zeroScale": "0を含む",+ "misc": "その他","formatGuidesDocs": "フォーマットガイド","readHere": "ここを読む"},diff --git a/packages/graphic-walker/src/locales/zh-CN.json b/packages/graphic-walker/src/locales/zh-CN.jsonindex 24a4f8da..da946a39 100644--- a/packages/graphic-walker/src/locales/zh-CN.json+++ b/packages/graphic-walker/src/locales/zh-CN.json@@ -10,6 +10,7 @@"x": "x轴","y": "y轴","zeroScale": "零刻度",+ "misc": "其他","formatGuidesDocs": "格式指南","readHere": "阅读此处"},