@visactor/vseed 0.1.35 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/cjs/index.cjs +2 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +36 -0
  4. package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +3 -1
  5. package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
  6. package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js +3 -1
  7. package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
  8. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js +1 -3
  9. package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js.map +1 -1
  10. package/dist/esm/pipeline/spec/chart/pipeline/bar.js +2 -1
  11. package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
  12. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +3 -1
  13. package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
  14. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +2 -1
  15. package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
  16. package/dist/esm/pipeline/spec/chart/pipeline/column.js +2 -1
  17. package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
  18. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +3 -1
  19. package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
  20. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +2 -1
  21. package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
  22. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +9 -1
  23. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
  24. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.d.ts +2 -0
  25. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.js +14 -0
  26. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.js.map +1 -0
  27. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.d.ts +2 -0
  28. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.js +14 -0
  29. package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.js.map +1 -0
  30. package/dist/esm/pipeline/spec/chart/pipes/barWidth/index.d.ts +2 -0
  31. package/dist/esm/pipeline/spec/chart/pipes/barWidth/index.js +2 -0
  32. package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
  33. package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
  34. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +2 -1
  35. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  36. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js +6 -7
  37. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
  38. package/dist/esm/theme/common/annotaion.d.ts +3 -0
  39. package/dist/esm/theme/common/annotaion.js +33 -49
  40. package/dist/esm/theme/common/annotaion.js.map +1 -1
  41. package/dist/esm/theme/common/label.d.ts +18 -0
  42. package/dist/esm/theme/common/label.js +9 -1
  43. package/dist/esm/theme/common/label.js.map +1 -1
  44. package/dist/esm/theme/dark/dark.js +2 -2
  45. package/dist/esm/theme/dark/dark.js.map +1 -1
  46. package/dist/esm/theme/light/light.js +2 -2
  47. package/dist/esm/theme/light/light.js.map +1 -1
  48. package/dist/esm/types/advancedVSeed.d.ts +12 -0
  49. package/dist/esm/types/chartType/bar/bar.d.ts +5 -1
  50. package/dist/esm/types/chartType/bar/zBar.d.ts +1 -0
  51. package/dist/esm/types/chartType/bar/zBar.js +2 -1
  52. package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
  53. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +9 -1
  54. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +2 -0
  55. package/dist/esm/types/chartType/barParallel/zBarParallel.js +3 -1
  56. package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
  57. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +5 -1
  58. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +1 -0
  59. package/dist/esm/types/chartType/barPercent/zBarPercent.js +2 -1
  60. package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
  61. package/dist/esm/types/chartType/column/column.d.ts +5 -1
  62. package/dist/esm/types/chartType/column/zColumn.d.ts +1 -0
  63. package/dist/esm/types/chartType/column/zColumn.js +2 -1
  64. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  65. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +9 -1
  66. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +2 -0
  67. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +3 -1
  68. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
  69. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +5 -1
  70. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +1 -0
  71. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +2 -1
  72. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
  73. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +9 -1
  74. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +2 -0
  75. package/dist/esm/types/chartType/dualAxis/zDualAxis.js +3 -1
  76. package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
  77. package/dist/esm/types/properties/config/barWidth/index.d.ts +5 -0
  78. package/dist/esm/types/properties/config/barWidth/index.js +6 -0
  79. package/dist/esm/types/properties/config/barWidth/index.js.map +1 -0
  80. package/dist/esm/types/properties/config/column.d.ts +6 -0
  81. package/dist/esm/types/properties/config/column.js +3 -0
  82. package/dist/esm/types/properties/config/column.js.map +1 -1
  83. package/dist/esm/types/properties/config/config.d.ts +6 -0
  84. package/dist/esm/types/properties/config/index.d.ts +1 -0
  85. package/dist/esm/types/properties/config/index.js +1 -0
  86. package/dist/esm/types/properties/config/label/label.d.ts +4 -0
  87. package/dist/esm/types/properties/theme/customTheme.d.ts +12 -0
  88. package/dist/esm/types/zVseed.d.ts +10 -0
  89. package/dist/umd/index.js +111 -64
  90. package/dist/umd/index.js.map +1 -1
  91. package/package.json +1 -1
@@ -15,3 +15,4 @@ export * from './crosshair';
15
15
  export * from './series';
16
16
  export * from './dual';
17
17
  export * from './size';
18
+ export * from './barWidth';
@@ -15,3 +15,4 @@ export * from "./crosshair/index.js";
15
15
  export * from "./series/index.js";
16
16
  export * from "./dual/index.js";
17
17
  export * from "./size/index.js";
18
+ export * from "./barWidth/index.js";
@@ -34,7 +34,7 @@ const generateMeasurePercent = (value, sum, formatter)=>{
34
34
  return formatter(percentValue);
35
35
  };
36
36
  const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedDimensions, advancedVSeedMeasures, encoding, foldInfoList)=>{
37
- const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
37
+ const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelStroke, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
38
38
  const hasDimLabelEncoding = vseedDimensions.some((item)=>encoding.label?.includes(item.id));
39
39
  const labelDims = uniqueBy(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureName) : [], (item)=>item.id);
40
40
  const labelMeas = uniqueBy(vseedMeasures.filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
@@ -69,6 +69,7 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
69
69
  },
70
70
  position: labelPosition,
71
71
  style: {
72
+ stroke: labelStroke,
72
73
  fill: labelColor,
73
74
  fontSize: labelFontSize,
74
75
  fontWeight: labelFontWeight,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { IArcLabelSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { MeasureName } from 'src/dataReshape/constant'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel<ILineLikeLabelSpec>(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n )\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = <T extends ILineLikeLabelSpec | IArcLabelSpec>(\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n): T => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureName)\n : [],\n (item) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n dataFilter: (data) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true\n })\n },\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n // 饼图/环图需要使用实际占比数据\n const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO'])\n ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter)\n : generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter)\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as T\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureName","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel","isNumber"],"mappings":";;;AAkBO,MAAMA,cAAkB,CAACC,MAAMC;IACpC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ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BAAqB,EAAE,GAAGN,oBACvDhC,uBAAuBsC,KAAK,CAACK,aAAa,EAAqBC,WAAW,GAAG,EAAEZ;oBACnF,IAAInB,WACFhC,OAAO,IAAI,CAACiE;oBAEd,IAAIhC,kBACFjC,OAAO,IAAI,CAACkE;gBAEhB;YACF;YAEAlE,OAAO,IAAI,IAAI4D;YAEf,IAAI7B,MACF,OAAO/B;YAET,OAAOA,OAAO,IAAI,CAAC;QACrB;QACA,UAAUyC;QACV,OAAO;YACL,MAAMJ;YACN,UAAUC;YACV,YAAYC;YACZ,YAAYC;QACd;QACA,aAAaJ;IACf;IAEA,IAAID,cACFnC,OAAO,OAAO,GAAG;QACf,WAAW;QACX,YAAY;IACd;IAGF,OAAOA;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { IArcLabelSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { MeasureName } from 'src/dataReshape/constant'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel<ILineLikeLabelSpec>(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n )\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = <T extends ILineLikeLabelSpec | IArcLabelSpec>(\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n): T => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelStroke,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureName)\n : [],\n (item) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n dataFilter: (data) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true\n })\n },\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n // 饼图/环图需要使用实际占比数据\n const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO'])\n ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter)\n : generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter)\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n stroke: labelStroke,\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as T\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelStroke","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureName","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel","isNumber"],"mappings":";;;AAkBO,MAAMA,cAAkB,CAACC,MAAMC;IACpC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAE/C,MAAM,EAAEN,KAAK,EAAE,GAAGS;IAElBN,OAAO,KAAK,GAAGQ,WACbX,OACAK,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,UAAU,EACxBA,cAAc,QAAQ,EACtBI,UACA;QAACE;KAAS;IAGZ,OAAOP;AACT;AAEO,MAAMS,uBAAuB,CAClCC,OACAC,SACAC,iBACAC,YAAuB,CAAC,CAAC;IAEzB,MAAMC,SAASC,MAAMF,WAAWF,QAAQ,SAAS,IAAIA,QAAQ,MAAM;IACnE,MAAMK,gBAAgB;QAAE,GAAGL,OAAO;QAAE,WAAWG;QAAQ,YAAYF,mBAAmBD,QAAQ,UAAU;IAAC;IAEzG,MAAMM,YAAYC,yBAAyBF;IAC3C,OAAOC,UAAUP;AACnB;AAEO,MAAMS,yBAAyB,CAACT,OAAwBU,KAAaH;IAC1E,IAAIP,QAAAA,OAAuC,OAAOW,OAAOX;IACzD,MAAMY,MAAMC,OAAOb;IACnB,IAAIa,OAAO,KAAK,CAACD,MAAM,OAAOD,OAAOX;IAErC,MAAMc,eAAeF,MAAMF;IAC3B,OAAOH,UAAUO;AACnB;AAEO,MAAMhB,aAAa,CACxBX,OACA4B,gBAA0B,EAAE,EAC5BC,kBAA8B,EAAE,EAChCC,yBACAC,uBACAvB,UACAwB;IAEA,MAAM,EACJC,MAAM,E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,MAAM,EAAEuD,SAAS,EAAEC,YAAY,EAAEC,UAAU,EAAE,GAAGzD;gBAChD,MAAMI,UAAUsD,gBAAgBrC,uBAAuB8B,KAAK,CAACI,UAAU;gBACvE,IAAInD,SAAS;oBACX,MAAMuD,oBAAoBzD,qBACxBiD,KAAK,CAACK,aAAa,EACnBpD,SACAgC,YACA9B;oBAGF,MAAMsD,sBAAsBC,SAASV,KAAK,CAAC,qBAAqB,IAC5DvC,uBAAuBuC,KAAK,CAAC,qBAAqB,EAAE,GAAGN,oBACvDjC,uBAAuBuC,KAAK,CAACK,aAAa,EAAqBC,WAAW,GAAG,EAAEZ;oBACnF,IAAIpB,WACFhC,OAAO,IAAI,CAACkE;oBAEd,IAAIjC,kBACFjC,OAAO,IAAI,CAACmE;gBAEhB;YACF;YAEAnE,OAAO,IAAI,IAAI6D;YAEf,IAAI9B,MACF,OAAO/B;YAET,OAAOA,OAAO,IAAI,CAAC;QACrB;QACA,UAAU0C;QACV,OAAO;YACL,QAAQL;YACR,MAAMC;YACN,UAAUC;YACV,YAAYC;YACZ,YAAYC;QACd;QACA,aAAaL;IACf;IAEA,IAAID,cACFnC,OAAO,OAAO,GAAG;QACf,WAAW;QACX,YAAY;IACd;IAGF,OAAOA;AACT"}
@@ -9,6 +9,8 @@ const barStyle_barStyle = (spec, context)=>{
9
9
  ...spec,
10
10
  bar: {
11
11
  style: {
12
+ visible: true,
13
+ fillOpacity: 1,
12
14
  lineWidth: showStroke ? 1 : 0
13
15
  },
14
16
  state: {
@@ -57,14 +59,11 @@ const barStyle_barStyle = (spec, context)=>{
57
59
  }
58
60
  };
59
61
  }, {});
60
- return {
61
- ...result,
62
- bar: {
63
- state: {
64
- ...customMap
65
- }
66
- }
62
+ result.bar.state = {
63
+ ...result.bar.state,
64
+ ...customMap
67
65
  };
66
+ return result;
68
67
  };
69
68
  export { barStyle_barStyle as barStyle };
70
69
 
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/barStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/barStyle.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BarStyle, Datum, SpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const barStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, dataset = [] } = advancedVSeed\n const { barStyle } = markStyle\n\n const showStroke = dataset.length <= 100\n\n const result = {\n ...spec,\n bar: {\n style: {\n lineWidth: showStroke ? 1 : 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n } as IBarChartSpec\n\n if (isNullish(barStyle) || isEmpty(barStyle)) {\n return result\n }\n\n const barStyles = (Array.isArray(barStyle) ? barStyle : [barStyle]) as BarStyle[]\n\n const customMap = barStyles.reduce<object>((result, style, index) => {\n const {\n barBorderColor,\n barBorderStyle,\n barBorderWidth = 1,\n barColor,\n barColorOpacity,\n barRadius,\n barVisible = true,\n } = style\n\n const lineDash = barBorderStyle === 'dashed' ? [5, 2] : barBorderStyle === 'dotted' ? [2, 5] : [0, 0]\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n if (selector(datum, style.selector)) {\n return true\n }\n return false\n },\n style: {\n visible: barVisible,\n fill: barColor,\n fillOpacity: barColorOpacity,\n cornerRadius: barRadius,\n innerBorder: {\n stroke: barBorderColor,\n lineWidth: barBorderWidth,\n distance: (barBorderWidth || 0) / 2,\n lineDash: lineDash,\n },\n },\n },\n }\n }, {})\n\n return {\n ...result,\n bar: {\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["barStyle","spec","context","advancedVSeed","markStyle","dataset","showStroke","result","isNullish","isEmpty","barStyles","Array","customMap","style","index","barBorderColor","barBorderStyle","barBorderWidth","barColor","barColorOpacity","barRadius","barVisible","lineDash","datum","selector"],"mappings":";;AAKO,MAA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BACL,GAAGK,SAAS;YACd;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/barStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/barStyle.ts"],"sourcesContent":["import type { IBarChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { BarStyle, Datum, SpecPipe } from 'src/types'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const barStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, dataset = [] } = advancedVSeed\n const { barStyle } = markStyle\n\n const showStroke = dataset.length <= 100\n\n const result = {\n ...spec,\n bar: {\n style: {\n visible: true,\n fillOpacity: 1,\n lineWidth: showStroke ? 1 : 0,\n },\n state: {\n hover: {\n fillOpacity: 0.6,\n },\n },\n },\n } as IBarChartSpec\n\n if (isNullish(barStyle) || isEmpty(barStyle)) {\n return result\n }\n\n const barStyles = (Array.isArray(barStyle) ? barStyle : [barStyle]) as BarStyle[]\n\n const customMap = barStyles.reduce<object>((result, style, index) => {\n const {\n barBorderColor,\n barBorderStyle,\n barBorderWidth = 1,\n barColor,\n barColorOpacity,\n barRadius,\n barVisible = true,\n } = style\n\n const lineDash = barBorderStyle === 'dashed' ? [5, 2] : barBorderStyle === 'dotted' ? [2, 5] : [0, 0]\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n if (selector(datum, style.selector)) {\n return true\n }\n return false\n },\n style: {\n visible: barVisible,\n fill: barColor,\n fillOpacity: barColorOpacity,\n cornerRadius: barRadius,\n innerBorder: {\n stroke: barBorderColor,\n lineWidth: barBorderWidth,\n distance: (barBorderWidth || 0) / 2,\n lineDash: lineDash,\n },\n },\n },\n }\n }, {})\n\n result.bar!.state = {\n ...result.bar!.state,\n ...customMap,\n }\n\n return result\n}\n"],"names":["barStyle","spec","context","advancedVSeed","markStyle","dataset","showStroke","result","isNullish","isEmpty","barStyles","Array","customMap","style","index","barBorderColor","barBorderStyle","barBorderWidth","barColor","barColorOpacity","barRadius","barVisible","lineDash","datum","selector"],"mappings":";;AAKO,MAAMA,oBAAqB,CAACC,MAAMC;IACvC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,UAAU,EAAE,EAAE,GAAGF;IACpC,MAAM,EAAEH,QAAQ,EAAE,GAAGI;IAErB,MAAME,aAAaD,QAAQ,MAAM,IAAI;IAErC,MAAME,SAAS;QACb,GAAGN,IAAI;QACP,KAAK;YACH,OAAO;gBACL,SAAS;gBACT,aAAa;gBACb,WAAWK,aAAa,IAAI;YAC9B;YACA,OAAO;gBACL,OAAO;oBACL,aAAa;gBACf;YACF;QACF;IACF;IAEA,IAAIE,UAAUR,aAAaS,QAAQT,WACjC,OAAOO;IAGT,MAAMG,YAAaC,MAAM,OAAO,CAACX,YAAYA,WAAW;QAACA;KAAS;IAElE,MAAMY,YAAYF,UAAU,MAAM,CAAS,CAACH,QAAQM,OAAOC;QACzD,MAAM,EACJC,cAAc,EACdC,cAAc,EACdC,iBAAiB,CAAC,EAClBC,QAAQ,EACRC,eAAe,EACfC,SAAS,EACTC,aAAa,IAAI,EAClB,GAAGR;QAEJ,MAAMS,WAAWN,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAGA,AAAmB,aAAnBA,iBAA8B;YAAC;YAAG;SAAE,GAAG;YAAC;YAAG;SAAE;QACrG,OAAO;YACL,GAAGT,MAAM;YACT,CAAC,CAAC,MAAM,EAAEO,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACS;oBACP,IAAIC,SAASD,OAAOV,MAAM,QAAQ,GAChC,OAAO;oBAET,OAAO;gBACT;gBACA,OAAO;oBACL,SAASQ;oBACT,MAAMH;oBACN,aAAaC;oBACb,cAAcC;oBACd,aAAa;wBACX,QAAQL;wBACR,WAAWE;wBACX,UAAWA,AAAAA,CAAAA,kBAAkB,KAAK;wBAClC,UAAUK;oBACZ;gBACF;YACF;QACF;IACF,GAAG,CAAC;IAEJf,OAAO,GAAG,CAAE,KAAK,GAAG;QAClB,GAAGA,OAAO,GAAG,CAAE,KAAK;QACpB,GAAGK,SAAS;IACd;IAEA,OAAOL;AACT"}
@@ -1,7 +1,10 @@
1
1
  import type { AnnotationAreaConfig, AnnotationHorizontalLineConfig, AnnotationPointConfig } from '../../types/properties/config/annotation/annotation';
2
+ export declare const getDefaultAnnotationPoint: () => AnnotationPointConfig;
2
3
  export declare const getLightAnnotationPoint: () => AnnotationPointConfig;
4
+ export declare const getDefaultAnnotationLine: () => AnnotationHorizontalLineConfig;
3
5
  export declare const getLightAnnotationHorizontalLine: () => AnnotationHorizontalLineConfig;
4
6
  export declare const getLightAnnotationVerticalLine: () => AnnotationHorizontalLineConfig;
7
+ export declare const getDefaultAnnotationArea: () => AnnotationAreaConfig;
5
8
  export declare const getLightAnnotationArea: () => AnnotationAreaConfig;
6
9
  export declare const getLightAnnotation: () => {
7
10
  annotationPoint: AnnotationPointConfig;
@@ -1,45 +1,45 @@
1
- const getLightAnnotationPoint = ()=>({
2
- textColor: '#ffffff',
1
+ const getDefaultAnnotationPoint = ()=>({
3
2
  textBackgroundVisible: true,
4
- textBackgroundColor: '#364159',
5
- textBackgroundBorderColor: '#3641594d',
6
3
  textFontSize: 12,
7
4
  textFontWeight: 400,
8
5
  textBackgroundBorderRadius: 4,
9
6
  textBackgroundBorderWidth: 1,
10
7
  textBackgroundPadding: 2
11
8
  });
12
- const getLightAnnotationHorizontalLine = ()=>({
13
- lineColor: '#BCC1CB',
9
+ const getLightAnnotationPoint = ()=>({
10
+ ...getDefaultAnnotationPoint(),
11
+ textColor: '#ffffff',
12
+ textBackgroundColor: '#364159',
13
+ textBackgroundBorderColor: '#3641594d'
14
+ });
15
+ const getDefaultAnnotationLine = ()=>({
16
+ lineVisible: true,
14
17
  lineWidth: 1,
15
18
  lineStyle: 'solid',
16
- lineVisible: true,
17
- textColor: '#ffffff',
18
19
  textFontSize: 12,
19
20
  textFontWeight: 400,
20
21
  startSymbolVisible: true,
21
22
  endSymbolVisible: false,
22
23
  textBackgroundVisible: true,
23
- textBackgroundColor: '#BCC1CB',
24
- textBackgroundBorderColor: '#BCC1CB',
25
24
  textBackgroundBorderWidth: 1,
26
25
  textBackgroundBorderRadius: 0,
27
26
  textBackgroundPadding: 2
28
27
  });
29
- const getLightAnnotationVerticalLine = ()=>getLightAnnotationHorizontalLine();
30
- const getLightAnnotationArea = ()=>({
28
+ const getLightAnnotationHorizontalLine = ()=>({
29
+ ...getDefaultAnnotationLine(),
30
+ lineColor: '#BCC1CB',
31
31
  textColor: '#ffffff',
32
+ textBackgroundColor: '#BCC1CB',
33
+ textBackgroundBorderColor: '#BCC1CB'
34
+ });
35
+ const getLightAnnotationVerticalLine = ()=>getLightAnnotationHorizontalLine();
36
+ const getDefaultAnnotationArea = ()=>({
32
37
  textFontSize: 12,
33
38
  textFontWeight: 400,
34
39
  textBackgroundVisible: true,
35
- textBackgroundColor: '#BCC1CB',
36
- textBackgroundBorderColor: '#BCC1CB',
37
40
  textBackgroundBorderWidth: 1,
38
41
  textBackgroundBorderRadius: 0,
39
42
  textBackgroundPadding: 4,
40
- areaColor: '#BCC1CB',
41
- areaColorOpacity: 0.12,
42
- areaBorderColor: '#BCC1CB',
43
43
  areaBorderWidth: 0,
44
44
  areaBorderRadius: 0,
45
45
  areaLineDash: [
@@ -48,6 +48,15 @@ const getLightAnnotationArea = ()=>({
48
48
  ],
49
49
  outerPadding: 4
50
50
  });
51
+ const getLightAnnotationArea = ()=>({
52
+ ...getDefaultAnnotationArea(),
53
+ textColor: '#ffffff',
54
+ textBackgroundColor: '#BCC1CB',
55
+ textBackgroundBorderColor: '#BCC1CB',
56
+ areaColor: '#BCC1CB',
57
+ areaColorOpacity: 0.12,
58
+ areaBorderColor: '#BCC1CB'
59
+ });
51
60
  const getLightAnnotation = ()=>({
52
61
  annotationPoint: getLightAnnotationPoint(),
53
62
  annotationHorizontalLine: getLightAnnotationHorizontalLine(),
@@ -55,52 +64,27 @@ const getLightAnnotation = ()=>({
55
64
  annotationArea: getLightAnnotationArea()
56
65
  });
57
66
  const getDarkAnnotationPoint = ()=>({
67
+ ...getDefaultAnnotationPoint(),
58
68
  textColor: '#4B4F54',
59
- textBackgroundVisible: true,
60
69
  textBackgroundColor: '#ffffff',
61
- textBackgroundBorderColor: '#ffffff',
62
- textFontSize: 12,
63
- textFontWeight: 400,
64
- textBackgroundBorderRadius: 4,
65
- textBackgroundBorderWidth: 1,
66
- textBackgroundPadding: 2
70
+ textBackgroundBorderColor: '#ffffff'
67
71
  });
68
72
  const getDarkAnnotationHorizontalLine = ()=>({
73
+ ...getDefaultAnnotationLine(),
69
74
  lineColor: '#55595F',
70
- lineWidth: 1,
71
- lineStyle: 'solid',
72
- lineVisible: true,
73
- textFontSize: 12,
74
- textFontWeight: 400,
75
- textBackgroundVisible: true,
76
75
  textColor: '#E2E3E6',
77
76
  textBackgroundColor: '#55595F',
78
- textBackgroundBorderColor: '#55595F',
79
- textBackgroundBorderWidth: 1,
80
- textBackgroundBorderRadius: 0,
81
- textBackgroundPadding: 2
77
+ textBackgroundBorderColor: '#55595F'
82
78
  });
83
79
  const getDarkAnnotationVerticalLine = ()=>getDarkAnnotationHorizontalLine();
84
80
  const getDarkAnnotationArea = ()=>({
81
+ ...getDefaultAnnotationArea(),
85
82
  textColor: '#E2E3E6',
86
- textFontSize: 12,
87
- textFontWeight: 400,
88
- textBackgroundVisible: true,
89
83
  textBackgroundColor: '#55595F',
90
84
  textBackgroundBorderColor: '#55595F',
91
- textBackgroundBorderWidth: 1,
92
- textBackgroundBorderRadius: 0,
93
- textBackgroundPadding: 4,
94
85
  areaColor: '#E2E3E6',
95
86
  areaColorOpacity: 0.15,
96
- areaBorderColor: '#E2E3E6',
97
- areaBorderWidth: 0,
98
- areaBorderRadius: 0,
99
- areaLineDash: [
100
- 2,
101
- 2
102
- ],
103
- outerPadding: 4
87
+ areaBorderColor: '#E2E3E6'
104
88
  });
105
89
  const getDarkAnnotation = ()=>({
106
90
  annotationPoint: getDarkAnnotationPoint(),
@@ -109,6 +93,6 @@ const getDarkAnnotation = ()=>({
109
93
  annotationArea: getDarkAnnotationArea()
110
94
  });
111
95
  const annotaion = getLightAnnotation;
112
- export { annotaion as default, getDarkAnnotation, getDarkAnnotationArea, getDarkAnnotationHorizontalLine, getDarkAnnotationPoint, getDarkAnnotationVerticalLine, getLightAnnotation, getLightAnnotationArea, getLightAnnotationHorizontalLine, getLightAnnotationPoint, getLightAnnotationVerticalLine };
96
+ export { annotaion as default, getDarkAnnotation, getDarkAnnotationArea, getDarkAnnotationHorizontalLine, getDarkAnnotationPoint, getDarkAnnotationVerticalLine, getDefaultAnnotationArea, getDefaultAnnotationLine, getDefaultAnnotationPoint, getLightAnnotation, getLightAnnotationArea, getLightAnnotationHorizontalLine, getLightAnnotationPoint, getLightAnnotationVerticalLine };
113
97
 
114
98
  //# sourceMappingURL=annotaion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme/common/annotaion.js","sources":["webpack://@visactor/vseed/./src/theme/common/annotaion.ts"],"sourcesContent":["import type {\n AnnotationAreaConfig,\n AnnotationHorizontalLineConfig,\n AnnotationPointConfig,\n} from 'src/types/properties/config/annotation/annotation'\n\nexport const getLightAnnotationPoint = (): AnnotationPointConfig => ({\n textColor: '#ffffff',\n\n textBackgroundVisible: true,\n textBackgroundColor: '#364159',\n textBackgroundBorderColor: '#3641594d',\n\n textFontSize: 12,\n textFontWeight: 400,\n\n textBackgroundBorderRadius: 4,\n textBackgroundBorderWidth: 1,\n textBackgroundPadding: 2,\n})\n\nexport const getLightAnnotationHorizontalLine = (): AnnotationHorizontalLineConfig => ({\n lineColor: '#BCC1CB',\n lineWidth: 1,\n lineStyle: 'solid' as const,\n lineVisible: true,\n\n textColor: '#ffffff',\n textFontSize: 12,\n textFontWeight: 400,\n\n startSymbolVisible: true,\n endSymbolVisible: false,\n\n textBackgroundVisible: true,\n textBackgroundColor: '#BCC1CB',\n textBackgroundBorderColor: '#BCC1CB',\n textBackgroundBorderWidth: 1,\n textBackgroundBorderRadius: 0,\n textBackgroundPadding: 2,\n})\n\nexport const getLightAnnotationVerticalLine = () => getLightAnnotationHorizontalLine()\n\nexport const getLightAnnotationArea = (): AnnotationAreaConfig => ({\n textColor: '#ffffff',\n textFontSize: 12,\n textFontWeight: 400,\n\n textBackgroundVisible: true,\n textBackgroundColor: '#BCC1CB',\n textBackgroundBorderColor: '#BCC1CB',\n textBackgroundBorderWidth: 1,\n textBackgroundBorderRadius: 0,\n textBackgroundPadding: 4,\n\n areaColor: '#BCC1CB',\n areaColorOpacity: 0.12,\n areaBorderColor: '#BCC1CB',\n areaBorderWidth: 0,\n areaBorderRadius: 0,\n areaLineDash: [2, 2],\n\n outerPadding: 4,\n})\n\nexport const getLightAnnotation = () => ({\n annotationPoint: getLightAnnotationPoint(),\n annotationHorizontalLine: getLightAnnotationHorizontalLine(),\n annotationVerticalLine: getLightAnnotationVerticalLine(),\n annotationArea: getLightAnnotationArea(),\n})\n\n// --- dark ---\nexport const getDarkAnnotationPoint = (): AnnotationPointConfig => ({\n textColor: '#4B4F54',\n\n textBackgroundVisible: true,\n textBackgroundColor: '#ffffff',\n textBackgroundBorderColor: '#ffffff',\n\n textFontSize: 12,\n textFontWeight: 400,\n\n textBackgroundBorderRadius: 4,\n textBackgroundBorderWidth: 1,\n textBackgroundPadding: 2,\n})\n\nexport const getDarkAnnotationHorizontalLine = (): AnnotationHorizontalLineConfig => ({\n lineColor: '#55595F',\n lineWidth: 1,\n lineStyle: 'solid' as const,\n lineVisible: true,\n\n textFontSize: 12,\n textFontWeight: 400,\n\n textBackgroundVisible: true,\n textColor: '#E2E3E6',\n textBackgroundColor: '#55595F',\n textBackgroundBorderColor: '#55595F',\n textBackgroundBorderWidth: 1,\n textBackgroundBorderRadius: 0,\n textBackgroundPadding: 2,\n})\n\nexport const getDarkAnnotationVerticalLine = () => getDarkAnnotationHorizontalLine()\n\nexport const getDarkAnnotationArea = (): AnnotationAreaConfig => ({\n textColor: '#E2E3E6',\n textFontSize: 12,\n textFontWeight: 400,\n\n textBackgroundVisible: true,\n textBackgroundColor: '#55595F',\n textBackgroundBorderColor: '#55595F',\n textBackgroundBorderWidth: 1,\n textBackgroundBorderRadius: 0,\n textBackgroundPadding: 4,\n\n areaColor: '#E2E3E6',\n areaColorOpacity: 0.15,\n areaBorderColor: '#E2E3E6',\n areaBorderWidth: 0,\n areaBorderRadius: 0,\n areaLineDash: [2, 2],\n\n outerPadding: 4,\n})\n\nexport const getDarkAnnotation = () => ({\n annotationPoint: getDarkAnnotationPoint(),\n annotationHorizontalLine: getDarkAnnotationHorizontalLine(),\n annotationVerticalLine: getDarkAnnotationVerticalLine(),\n annotationArea: getDarkAnnotationArea(),\n})\n\nexport default getLightAnnotation\n"],"names":["getLightAnnotationPoint","getLightAnnotationHorizontalLine","getLightAnnotationVerticalLine","getLightAnnotationArea","getLightAnnotation","getDarkAnnotationPoint","getDarkAnnotationHorizontalLine","getDarkAnnotationVerticalLine","getDarkAnnotationArea","getDarkAnnotation"],"mappings":"AAMO,MAAMA,0BAA0B,IAA8B;QACnE,WAAW;QAEX,uBAAuB;QACvB,qBAAqB;QACrB,2BAA2B;QAE3B,cAAc;QACd,gBAAgB;QAEhB,4BAA4B;QAC5B,2BAA2B;QAC3B,uBAAuB;IACzB;AAEO,MAAMC,mCAAmC,IAAuC;QACrF,WAAW;QACX,WAAW;QACX,WAAW;QACX,aAAa;QAEb,WAAW;QACX,cAAc;QACd,gBAAgB;QAEhB,oBAAoB;QACpB,kBAAkB;QAElB,uBAAuB;QACvB,qBAAqB;QACrB,2BAA2B;QAC3B,2BAA2B;QAC3B,4BAA4B;QAC5B,uBAAuB;IACzB;AAEO,MAAMC,iCAAiC,IAAMD;AAE7C,MAAME,yBAAyB,IAA6B;QACjE,WAAW;QACX,cAAc;QACd,gBAAgB;QAEhB,uBAAuB;QACvB,qBAAqB;QACrB,2BAA2B;QAC3B,2BAA2B;QAC3B,4BAA4B;QAC5B,uBAAuB;QAEvB,WAAW;QACX,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,kBAAkB;QAClB,cAAc;YAAC;YAAG;SAAE;QAEpB,cAAc;IAChB;AAEO,MAAMC,qBAAqB,IAAO;QACvC,iBAAiBJ;QACjB,0BAA0BC;QAC1B,wBAAwBC;QACxB,gBAAgBC;IAClB;AAGO,MAAME,yBAAyB,IAA8B;QAClE,WAAW;QAEX,uBAAuB;QACvB,qBAAqB;QACrB,2BAA2B;QAE3B,cAAc;QACd,gBAAgB;QAEhB,4BAA4B;QAC5B,2BAA2B;QAC3B,uBAAuB;IACzB;AAEO,MAAMC,kCAAkC,IAAuC;QACpF,WAAW;QACX,WAAW;QACX,WAAW;QACX,aAAa;QAEb,cAAc;QACd,gBAAgB;QAEhB,uBAAuB;QACvB,WAAW;QACX,qBAAqB;QACrB,2BAA2B;QAC3B,2BAA2B;QAC3B,4BAA4B;QAC5B,uBAAuB;IACzB;AAEO,MAAMC,gCAAgC,IAAMD;AAE5C,MAAME,wBAAwB,IAA6B;QAChE,WAAW;QACX,cAAc;QACd,gBAAgB;QAEhB,uBAAuB;QACvB,qBAAqB;QACrB,2BAA2B;QAC3B,2BAA2B;QAC3B,4BAA4B;QAC5B,uBAAuB;QAEvB,WAAW;QACX,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,kBAAkB;QAClB,cAAc;YAAC;YAAG;SAAE;QAEpB,cAAc;IAChB;AAEO,MAAMC,oBAAoB,IAAO;QACtC,iBAAiBJ;QACjB,0BAA0BC;QAC1B,wBAAwBC;QACxB,gBAAgBC;IAClB;AAEA,kBAAeJ"}
1
+ {"version":3,"file":"theme/common/annotaion.js","sources":["webpack://@visactor/vseed/./src/theme/common/annotaion.ts"],"sourcesContent":["import type {\n AnnotationAreaConfig,\n AnnotationHorizontalLineConfig,\n AnnotationPointConfig,\n} from 'src/types/properties/config/annotation/annotation'\n\nexport const getDefaultAnnotationPoint = (): AnnotationPointConfig => ({\n textBackgroundVisible: true,\n textFontSize: 12,\n textFontWeight: 400,\n\n textBackgroundBorderRadius: 4,\n textBackgroundBorderWidth: 1,\n textBackgroundPadding: 2,\n})\n\nexport const getLightAnnotationPoint = (): AnnotationPointConfig => ({\n ...getDefaultAnnotationPoint(),\n textColor: '#ffffff',\n textBackgroundColor: '#364159',\n textBackgroundBorderColor: '#3641594d',\n})\n\nexport const getDefaultAnnotationLine = (): AnnotationHorizontalLineConfig => ({\n lineVisible: true,\n lineWidth: 1,\n lineStyle: 'solid' as const,\n\n textFontSize: 12,\n textFontWeight: 400,\n startSymbolVisible: true,\n endSymbolVisible: false,\n\n textBackgroundVisible: true,\n textBackgroundBorderWidth: 1,\n textBackgroundBorderRadius: 0,\n textBackgroundPadding: 2,\n})\n\nexport const getLightAnnotationHorizontalLine = (): AnnotationHorizontalLineConfig => ({\n ...getDefaultAnnotationLine(),\n lineColor: '#BCC1CB',\n\n textColor: '#ffffff',\n\n textBackgroundColor: '#BCC1CB',\n textBackgroundBorderColor: '#BCC1CB',\n})\n\nexport const getLightAnnotationVerticalLine = () => getLightAnnotationHorizontalLine()\n\nexport const getDefaultAnnotationArea = (): AnnotationAreaConfig => ({\n textFontSize: 12,\n textFontWeight: 400,\n textBackgroundVisible: true,\n textBackgroundBorderWidth: 1,\n textBackgroundBorderRadius: 0,\n textBackgroundPadding: 4,\n areaBorderWidth: 0,\n areaBorderRadius: 0,\n areaLineDash: [2, 2],\n\n outerPadding: 4,\n})\n\nexport const getLightAnnotationArea = (): AnnotationAreaConfig => ({\n ...getDefaultAnnotationArea(),\n textColor: '#ffffff',\n\n textBackgroundColor: '#BCC1CB',\n textBackgroundBorderColor: '#BCC1CB',\n\n areaColor: '#BCC1CB',\n areaColorOpacity: 0.12,\n areaBorderColor: '#BCC1CB',\n})\n\nexport const getLightAnnotation = () => ({\n annotationPoint: getLightAnnotationPoint(),\n annotationHorizontalLine: getLightAnnotationHorizontalLine(),\n annotationVerticalLine: getLightAnnotationVerticalLine(),\n annotationArea: getLightAnnotationArea(),\n})\n\n// --- dark ---\nexport const getDarkAnnotationPoint = (): AnnotationPointConfig => ({\n ...getDefaultAnnotationPoint(),\n textColor: '#4B4F54',\n\n textBackgroundColor: '#ffffff',\n textBackgroundBorderColor: '#ffffff',\n})\n\nexport const getDarkAnnotationHorizontalLine = (): AnnotationHorizontalLineConfig => ({\n ...getDefaultAnnotationLine(),\n lineColor: '#55595F',\n\n textColor: '#E2E3E6',\n textBackgroundColor: '#55595F',\n textBackgroundBorderColor: '#55595F',\n})\n\nexport const getDarkAnnotationVerticalLine = () => getDarkAnnotationHorizontalLine()\n\nexport const getDarkAnnotationArea = (): AnnotationAreaConfig => ({\n ...getDefaultAnnotationArea(),\n textColor: '#E2E3E6',\n\n textBackgroundColor: '#55595F',\n textBackgroundBorderColor: '#55595F',\n\n areaColor: '#E2E3E6',\n areaColorOpacity: 0.15,\n areaBorderColor: '#E2E3E6',\n})\n\nexport const getDarkAnnotation = () => ({\n annotationPoint: getDarkAnnotationPoint(),\n annotationHorizontalLine: getDarkAnnotationHorizontalLine(),\n annotationVerticalLine: getDarkAnnotationVerticalLine(),\n annotationArea: getDarkAnnotationArea(),\n})\n\nexport default getLightAnnotation\n"],"names":["getDefaultAnnotationPoint","getLightAnnotationPoint","getDefaultAnnotationLine","getLightAnnotationHorizontalLine","getLightAnnotationVerticalLine","getDefaultAnnotationArea","getLightAnnotationArea","getLightAnnotation","getDarkAnnotationPoint","getDarkAnnotationHorizontalLine","getDarkAnnotationVerticalLine","getDarkAnnotationArea","getDarkAnnotation"],"mappings":"AAMO,MAAMA,4BAA4B,IAA8B;QACrE,uBAAuB;QACvB,cAAc;QACd,gBAAgB;QAEhB,4BAA4B;QAC5B,2BAA2B;QAC3B,uBAAuB;IACzB;AAEO,MAAMC,0BAA0B,IAA8B;QACnE,GAAGD,2BAA2B;QAC9B,WAA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B,wBAAwBC;QACxB,gBAAgBC;IAClB;AAEA,kBAAeJ"}
@@ -6,3 +6,21 @@ export declare const getDefaultLabel: () => {
6
6
  labelColorSmartInvert: boolean;
7
7
  labelOverlap: boolean;
8
8
  };
9
+ export declare const getDarkLabel: () => {
10
+ labelStroke: string;
11
+ enable: boolean;
12
+ wrap: boolean;
13
+ showValue: boolean;
14
+ showValuePercent: boolean;
15
+ labelColorSmartInvert: boolean;
16
+ labelOverlap: boolean;
17
+ };
18
+ export declare const getLightLabel: () => {
19
+ labelStroke: string;
20
+ enable: boolean;
21
+ wrap: boolean;
22
+ showValue: boolean;
23
+ showValuePercent: boolean;
24
+ labelColorSmartInvert: boolean;
25
+ labelOverlap: boolean;
26
+ };
@@ -6,6 +6,14 @@ const getDefaultLabel = ()=>({
6
6
  labelColorSmartInvert: false,
7
7
  labelOverlap: true
8
8
  });
9
- export { getDefaultLabel };
9
+ const getDarkLabel = ()=>({
10
+ ...getDefaultLabel(),
11
+ labelStroke: '#21252C'
12
+ });
13
+ const getLightLabel = ()=>({
14
+ ...getDefaultLabel(),
15
+ labelStroke: '#fff'
16
+ });
17
+ export { getDarkLabel, getDefaultLabel, getLightLabel };
10
18
 
11
19
  //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme/common/label.js","sources":["webpack://@visactor/vseed/./src/theme/common/label.ts"],"sourcesContent":["export const getDefaultLabel = () => ({\n enable: true,\n wrap: true,\n showValue: true,\n showValuePercent: false,\n labelColorSmartInvert: false,\n labelOverlap: true,\n})\n"],"names":["getDefaultLabel"],"mappings":"AAAO,MAAMA,kBAAkB,IAAO;QACpC,QAAQ;QACR,MAAM;QACN,WAAW;QACX,kBAAkB;QAClB,uBAAuB;QACvB,cAAc;IAChB"}
1
+ {"version":3,"file":"theme/common/label.js","sources":["webpack://@visactor/vseed/./src/theme/common/label.ts"],"sourcesContent":["export const getDefaultLabel = () => ({\n enable: true,\n wrap: true,\n showValue: true,\n showValuePercent: false,\n labelColorSmartInvert: false,\n labelOverlap: true,\n})\n\nexport const getDarkLabel = () => ({\n ...getDefaultLabel(),\n labelStroke: '#21252C',\n})\n\nexport const getLightLabel = () => ({\n ...getDefaultLabel(),\n labelStroke: '#fff',\n})\n"],"names":["getDefaultLabel","getDarkLabel","getLightLabel"],"mappings":"AAAO,MAAMA,kBAAkB,IAAO;QACpC,QAAQ;QACR,MAAM;QACN,WAAW;QACX,kBAAkB;QAClB,uBAAuB;QACvB,cAAc;IAChB;AAEO,MAAMC,eAAe,IAAO;QACjC,GAAGD,iBAAiB;QACpB,aAAa;IACf;AAEO,MAAME,gBAAgB,IAAO;QAClC,GAAGF,iBAAiB;QACpB,aAAa;IACf"}
@@ -1,4 +1,4 @@
1
- import { getDarkColor, getDarkCrosshairLine, getDarkCrosshairRect, getDarkPivotChartGridConfig, getDarkTableConfig, getDefaultLabel, getDefaultLegend } from "../common/index.js";
1
+ import { getDarkColor, getDarkCrosshairLine, getDarkCrosshairRect, getDarkLabel, getDarkPivotChartGridConfig, getDarkTableConfig, getDefaultLegend } from "../common/index.js";
2
2
  import { getDefaultTooltip } from "../common/tooltip.js";
3
3
  import { getDarkBandAxis, getDarkLinearAxis } from "../common/axes.js";
4
4
  import { getDarkAnnotation } from "../common/annotaion.js";
@@ -25,7 +25,7 @@ const darkTheme = ()=>{
25
25
  const baseConfig = {
26
26
  backgroundColor: 'transparent',
27
27
  color: getDarkColor(),
28
- label: getDefaultLabel(),
28
+ label: getDarkLabel(),
29
29
  legend: getDefaultLegend(),
30
30
  tooltip: getDefaultTooltip()
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig, YBandAxis } from 'src/types'\nimport {\n getDarkColor,\n getDarkCrosshairLine,\n getDarkCrosshairRect,\n getDarkTableConfig,\n getDefaultLabel,\n getDefaultLegend,\n getDarkPivotChartGridConfig,\n} from '../common'\nimport { getDefaultTooltip } from '../common/tooltip'\nimport { getDarkBandAxis, getDarkLinearAxis } from '../common/axes'\nimport { getDarkAnnotation } from '../common/annotaion'\nimport { getDarkFunnelTransformTheme } from '../common/funnelTransform'\nimport { getDarkHeatmapCellTheme } from '../common/heatmapCell'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const linearAxis = getDarkLinearAxis()\n const bandAxis = getDarkBandAxis()\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n const crosshairLine = getDarkCrosshairLine()\n const crosshairRect = getDarkCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getDarkColor(),\n label: getDefaultLabel(),\n legend: getDefaultLegend(),\n tooltip: getDefaultTooltip(),\n }\n\n const tableConfig = getDarkTableConfig()\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n column: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n columnParallel: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n columnPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n bar: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n barParallel: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n barPercent: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n scatter: {\n ...baseConfig,\n crosshairLine,\n sizeRange: [8, 24],\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n label: {\n ...baseConfig.label,\n showValue: false,\n showValuePercent: false,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n radar: {\n ...baseConfig,\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n // other\n funnel: {\n ...baseConfig,\n transform: getDarkFunnelTransformTheme(),\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n\n cell: getDarkHeatmapCellTheme(),\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","getDarkLinearAxis","bandAxis","getDarkBandAxis","barBandAxis","undefined","crosshairLine","getDarkCrosshairLine","crosshairRect","getDarkCrosshairRect","baseConfig","getDarkColor","getDefaultLabel","getDefaultLegend","getDefaultTooltip","tableConfig","getDarkTableConfig","getDarkPivotChartGridConfig","getDarkAnnotation","getDarkFunnelTransformTheme","getDarkHeatmapCellTheme"],"mappings":";;;;;;AAgBO,MAAMA,YAAY;IACvB,MAAMC,aAAaC;IACnB,MAAMC,WAAWC;IACjB,MAAMC,cAAyB;QAC7B,GAAGF,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsBG;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;IAC1C;IACA,MAAMC,gBAAgBC;IACtB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAa;QACjB,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,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBAEA,WAAWO;YACb;YAEA,QAAQ;gBACN,GAAGP,UAAU;gBACb,WAAWS;gBAEX,WAAWF;YACb;YACA,SAAS;gBACP,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;gBAEA,MAAMU;gBACN,WAAWH;YACb;QACF;IACF;AACF"}
1
+ {"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig, YBandAxis } from 'src/types'\nimport {\n getDarkColor,\n getDarkCrosshairLine,\n getDarkCrosshairRect,\n getDarkTableConfig,\n getDefaultLegend,\n getDarkPivotChartGridConfig,\n getDarkLabel,\n} from '../common'\nimport { getDefaultTooltip } from '../common/tooltip'\nimport { getDarkBandAxis, getDarkLinearAxis } from '../common/axes'\nimport { getDarkAnnotation } from '../common/annotaion'\nimport { getDarkFunnelTransformTheme } from '../common/funnelTransform'\nimport { getDarkHeatmapCellTheme } from '../common/heatmapCell'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const linearAxis = getDarkLinearAxis()\n const bandAxis = getDarkBandAxis()\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n const crosshairLine = getDarkCrosshairLine()\n const crosshairRect = getDarkCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getDarkColor(),\n label: getDarkLabel(),\n legend: getDefaultLegend(),\n tooltip: getDefaultTooltip(),\n }\n\n const tableConfig = getDarkTableConfig()\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n column: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n columnParallel: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n columnPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n bar: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n barParallel: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n barPercent: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n scatter: {\n ...baseConfig,\n crosshairLine,\n sizeRange: [8, 24],\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n label: {\n ...baseConfig.label,\n showValue: false,\n showValuePercent: false,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n radar: {\n ...baseConfig,\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n // other\n funnel: {\n ...baseConfig,\n transform: getDarkFunnelTransformTheme(),\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n\n cell: getDarkHeatmapCellTheme(),\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","getDarkLinearAxis","bandAxis","getDarkBandAxis","barBandAxis","undefined","crosshairLine","getDarkCrosshairLine","crosshairRect","getDarkCrosshairRect","baseConfig","getDarkColor","getDarkLabel","getDefaultLegend","getDefaultTooltip","tableConfig","getDarkTableConfig","getDarkPivotChartGridConfig","getDarkAnnotation","getDarkFunnelTransformTheme","getDarkHeatmapCellTheme"],"mappings":";;;;;;AAgBO,MAAMA,YAAY;IACvB,MAAMC,aAAaC;IACnB,MAAMC,WAAWC;IACjB,MAAMC,cAAyB;QAC7B,GAAGF,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsBG;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;IAC1C;IACA,MAAMC,gBAAgBC;IACtB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAa;QACjB,iBAAiB;QACjB,OAAOC;QACP,OAAOC;QACP,QAAQC;QACR,SAASC;IACX;IAEA,MAAMC,cAAcC;IAEpB,OAAO;QACL,QAAQ;YACN,OAAOD;YACP,YAAYA;YAGZ,MAAM;gBACJ,GAAGL,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACP,eAAeM;gBACf,WAAWW;gBACX,YAAYC;YACd;YACA,QAAQ;gBACN,GAAGR,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWS;gBACX,YAAYC;YACd;YACA,gBAAgB;gBACd,GAAGR,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWS;gBACX,YAAYC;YACd;YACA,eAAe;gBACb,GAAGR,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWS;gBACX,YAAYC;YACd;YACA,KAAK;gBACH,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;YACd;YAEA,KAAK;gBACH,GAAGR,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;oBACb,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,OAAO;gBACL,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;oBACb,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,OAAO;gBACL,GAAGP,UAAU;gBACb,WAAWO;YACb;YACA,MAAM;gBACJ,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,cAAc;gBACZ,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBAEA,WAAWO;YACb;YAEA,QAAQ;gBACN,GAAGP,UAAU;gBACb,WAAWS;gBAEX,WAAWF;YACb;YACA,SAAS;gBACP,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;gBAEA,MAAMU;gBACN,WAAWH;YACb;QACF;IACF;AACF"}
@@ -1,4 +1,4 @@
1
- import { getDefaultLabel, getDefaultLegend, getLightColor, getLightCrosshairLine, getLightCrosshairRect, getLightPivotChartGridConfig, getLightTableConfig } from "../common/index.js";
1
+ import { getDefaultLegend, getLightColor, getLightCrosshairLine, getLightCrosshairRect, getLightLabel, getLightPivotChartGridConfig, getLightTableConfig } from "../common/index.js";
2
2
  import { getDefaultTooltip } from "../common/tooltip.js";
3
3
  import { getLightBandAxis, getLightLinearAxis } from "../common/axes.js";
4
4
  import { getLightAnnotation } from "../common/annotaion.js";
@@ -25,7 +25,7 @@ const lightTheme = ()=>{
25
25
  const baseConfig = {
26
26
  backgroundColor: 'transparent',
27
27
  color: getLightColor(),
28
- label: getDefaultLabel(),
28
+ label: getLightLabel(),
29
29
  legend: getDefaultLegend(),
30
30
  tooltip: getDefaultTooltip()
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"theme/light/light.js","sources":["webpack://@visactor/vseed/./src/theme/light/light.ts"],"sourcesContent":["import type { CustomThemeConfig, YBandAxis } from 'src/types'\nimport {\n getDefaultLabel,\n getDefaultLegend,\n getLightColor,\n getLightCrosshairLine,\n getLightCrosshairRect,\n getLightPivotChartGridConfig,\n getLightTableConfig,\n} from '../common'\nimport { getDefaultTooltip } from '../common/tooltip'\nimport { getLightBandAxis, getLightLinearAxis } from '../common/axes'\nimport { getLightAnnotation } from '../common/annotaion'\nimport { getLightFunnelTransformTheme } from '../common/funnelTransform'\nimport { getLightHeatmapCellTheme } from '../common/heatmapCell'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const linearAxis = getLightLinearAxis()\n const bandAxis: YBandAxis = getLightBandAxis()\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n\n const crosshairLine = getLightCrosshairLine()\n const crosshairRect = getLightCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getLightColor(),\n label: getDefaultLabel(),\n legend: getDefaultLegend(),\n tooltip: getDefaultTooltip(),\n }\n const tableConfig = getLightTableConfig()\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n column: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n columnParallel: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n columnPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n bar: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n barParallel: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n barPercent: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n },\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n area: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n areaPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n crosshairLine,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n scatter: {\n ...baseConfig,\n crosshairLine,\n sizeRange: [8, 24],\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n label: {\n ...baseConfig.label,\n showValue: false,\n showValuePercent: false,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n },\n radar: {\n ...baseConfig,\n pivotGrid: getLightPivotChartGridConfig(),\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n // other\n funnel: {\n ...baseConfig,\n\n transform: getLightFunnelTransformTheme(),\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n cell: getLightHeatmapCellTheme(),\n pivotGrid: getLightPivotChartGridConfig(),\n },\n },\n }\n}\n"],"names":["lightTheme","linearAxis","getLightLinearAxis","bandAxis","getLightBandAxis","barBandAxis","undefined","crosshairLine","getLightCrosshairLine","crosshairRect","getLightCrosshairRect","baseConfig","getLightColor","getDefaultLabel","getDefaultLegend","getDefaultTooltip","tableConfig","getLightTableConfig","getLightPivotChartGridConfig","getLightAnnotation","getLightFunnelTransformTheme","getLightHeatmapCellTheme"],"mappings":";;;;;;AAgBO,MAAMA,aAAa;IACxB,MAAMC,aAAaC;IACnB,MAAMC,WAAsBC;IAC5B,MAAMC,cAAyB;QAC7B,GAA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AAU;gBACb,WAAWO;YACb;YACA,MAAM;gBACJ,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,cAAc;gBACZ,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBAEA,WAAWO;YACb;YAEA,QAAQ;gBACN,GAAGP,UAAU;gBAEb,WAAWS;gBAEX,WAAWF;YACb;YACA,SAAS;gBACP,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;gBACA,MAAMU;gBACN,WAAWH;YACb;QACF;IACF;AACF"}
1
+ {"version":3,"file":"theme/light/light.js","sources":["webpack://@visactor/vseed/./src/theme/light/light.ts"],"sourcesContent":["import type { CustomThemeConfig, YBandAxis } from 'src/types'\nimport {\n getDefaultLegend,\n getLightColor,\n getLightCrosshairLine,\n getLightCrosshairRect,\n getLightLabel,\n getLightPivotChartGridConfig,\n getLightTableConfig,\n} from '../common'\nimport { getDefaultTooltip } from '../common/tooltip'\nimport { getLightBandAxis, getLightLinearAxis } from '../common/axes'\nimport { getLightAnnotation } from '../common/annotaion'\nimport { getLightFunnelTransformTheme } from '../common/funnelTransform'\nimport { getLightHeatmapCellTheme } from '../common/heatmapCell'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const linearAxis = getLightLinearAxis()\n const bandAxis: YBandAxis = getLightBandAxis()\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n\n const crosshairLine = getLightCrosshairLine()\n const crosshairRect = getLightCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getLightColor(),\n label: getLightLabel(),\n legend: getDefaultLegend(),\n tooltip: getDefaultTooltip(),\n }\n const tableConfig = getLightTableConfig()\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n column: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n columnParallel: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n columnPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n bar: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n barParallel: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n barPercent: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n },\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n area: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n areaPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n crosshairLine,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n scatter: {\n ...baseConfig,\n crosshairLine,\n sizeRange: [8, 24],\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n label: {\n ...baseConfig.label,\n showValue: false,\n showValuePercent: false,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n },\n radar: {\n ...baseConfig,\n pivotGrid: getLightPivotChartGridConfig(),\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n pivotGrid: getLightPivotChartGridConfig(),\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n // other\n funnel: {\n ...baseConfig,\n\n transform: getLightFunnelTransformTheme(),\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n cell: getLightHeatmapCellTheme(),\n pivotGrid: getLightPivotChartGridConfig(),\n },\n },\n }\n}\n"],"names":["lightTheme","linearAxis","getLightLinearAxis","bandAxis","getLightBandAxis","barBandAxis","undefined","crosshairLine","getLightCrosshairLine","crosshairRect","getLightCrosshairRect","baseConfig","getLightColor","getLightLabel","getDefaultLegend","getDefaultTooltip","tableConfig","getLightTableConfig","getLightPivotChartGridConfig","getLightAnnotation","getLightFunnelTransformTheme","getLightHeatmapCellTheme"],"mappings":";;;;;;AAgBO,MAAMA,aAAa;IACxB,MAAMC,aAAaC;IACnB,MAAMC,WAAsBC;IAC5B,MAAMC,cAAyB;QAC7B,GAAGF,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsBG;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;IAC1C;IAEA,MAAMC,gBAAgBC;IACtB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAa;QACjB,iBAAiB;QACjB,OAAOC;QACP,OAAOC;QACP,QAAQC;QACR,SAASC;IACX;IACA,MAAMC,cAAcC;IAEpB,OAAO;QACL,QAAQ;YAEN,OAAOD;YACP,YAAYA;YAEZ,MAAM;gBACJ,GAAGL,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACPM;gBAEA,WAAWW;gBACX,YAAYC;YACd;YACA,QAAQ;gBACN,GAAGR,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACPQ;gBACA,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWS;gBACX,YAAYC;YACd;YACA,gBAAgB;gBACd,GAAGR,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACPQ;gBACA,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWS;gBACX,YAAYC;YACd;YACA,eAAe;gBACb,GAAGR,UAAU;gBACb,OAAOR;gBACP,OAAO;oBACL,GAAGF,UAAU;gBACf;gBACAQ;gBACA,mBAAmB;oBAAC;o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AAM;gBAAE;gBAC1D,eAAe;oBACb,SAAS;oBACT,WAAW;gBACb;gBACAQ;gBACA,WAAWS;gBACX,YAAYC;YACd;YAEA,KAAK;gBACH,GAAGR,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;oBACb,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,OAAO;gBACL,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;oBACb,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,OAAO;gBACL,GAAGP,UAAU;gBACb,WAAWO;YACb;YACA,MAAM;gBACJ,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,cAAc;gBACZ,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBAEA,WAAWO;YACb;YAEA,QAAQ;gBACN,GAAGP,UAAU;gBAEb,WAAWS;gBAEX,WAAWF;YACb;YACA,SAAS;gBACP,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;gBACA,MAAMU;gBACN,WAAWH;YACb;QACF;IACF;AACF"}
@@ -757,6 +757,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
757
757
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
758
758
  }, z.core.$strip>>>;
759
759
  stackCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>>;
760
+ barMaxWidth: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
761
+ barGapInGroup: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
760
762
  pivotGrid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
761
763
  borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
762
764
  bodyFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1079,6 +1081,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
1079
1081
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1080
1082
  }, z.core.$strip>>>;
1081
1083
  stackCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>>;
1084
+ barMaxWidth: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
1085
+ barGapInGroup: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
1082
1086
  pivotGrid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1083
1087
  borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1084
1088
  bodyFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1401,6 +1405,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
1401
1405
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1402
1406
  }, z.core.$strip>>>;
1403
1407
  stackCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>>;
1408
+ barMaxWidth: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
1409
+ barGapInGroup: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
1404
1410
  pivotGrid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1405
1411
  borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1406
1412
  bodyFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6084,6 +6090,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
6084
6090
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6085
6091
  }, z.core.$strip>>>;
6086
6092
  stackCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>>;
6093
+ barMaxWidth: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
6094
+ barGapInGroup: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
6087
6095
  pivotGrid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6088
6096
  borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6089
6097
  bodyFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6406,6 +6414,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
6406
6414
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6407
6415
  }, z.core.$strip>>>;
6408
6416
  stackCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>>;
6417
+ barMaxWidth: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
6418
+ barGapInGroup: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
6409
6419
  pivotGrid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6410
6420
  borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6411
6421
  bodyFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6728,6 +6738,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
6728
6738
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6729
6739
  }, z.core.$strip>>>;
6730
6740
  stackCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>>;
6741
+ barMaxWidth: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
6742
+ barGapInGroup: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
6731
6743
  pivotGrid: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6732
6744
  borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6733
6745
  bodyFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1,5 +1,5 @@
1
1
  import { type Locale } from '../../i18n';
2
- import type { MeasureTree, Sort, SortLegend } from '../../properties';
2
+ import type { BarMaxWidth, MeasureTree, Sort, SortLegend } from '../../properties';
3
3
  import { type AnnotationArea, type AnnotationHorizontalLine, type AnnotationPoint, type AnnotationVerticalLine, type BackgroundColor, type BarStyle, type Color, type CrosshairRect, type Dataset, type Dimensions, type Label, type Legend, type StackCornerRadius, type Theme, type Tooltip, type XLinearAxis, type YBandAxis } from '../../properties';
4
4
  /**
5
5
  * @description 条形图,适用于横向数据对比场景,Y轴为类目轴(分类数据),X轴为数值轴(连续数据),柱子横向排列
@@ -89,6 +89,10 @@ export interface Bar {
89
89
  * @description 条形图 堆叠圆角
90
90
  */
91
91
  stackCornerRadius?: StackCornerRadius;
92
+ /**
93
+ * @description 矩形的最大高度,可以是像素值或者百分比字符串
94
+ */
95
+ barMaxWidth?: BarMaxWidth;
92
96
  /**
93
97
  * @description Y轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
94
98
  * @example
@@ -338,6 +338,7 @@ export declare const zBar: z.ZodObject<{
338
338
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
339
339
  }, z.core.$strip>>>;
340
340
  stackCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>>;
341
+ barMaxWidth: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
341
342
  theme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
342
343
  barStyle: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodObject<{
343
344
  selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
@@ -1,5 +1,5 @@
1
1
  import { zLocale } from "../../i18n/index.js";
2
- import { zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zBackgroundColor, zBarStyle, zColor, zCrosshairRect, zDataset, zDimensions, zEncoding, zLabel, zLegend, zMeasureTree, zStackCornerRadius, zTheme, zTooltip, zXLinearAxis, zYBandAxis } from "../../properties/index.js";
2
+ import { zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zBackgroundColor, zBarMaxWidth, zBarStyle, zColor, zCrosshairRect, zDataset, zDimensions, zEncoding, zLabel, zLegend, zMeasureTree, zStackCornerRadius, zTheme, zTooltip, zXLinearAxis, zYBandAxis } from "../../properties/index.js";
3
3
  import { z } from "zod";
4
4
  const zBar = z.object({
5
5
  chartType: z.literal('bar'),
@@ -16,6 +16,7 @@ const zBar = z.object({
16
16
  yAxis: zYBandAxis.nullish(),
17
17
  crosshairRect: zCrosshairRect.nullish(),
18
18
  stackCornerRadius: zStackCornerRadius.nullish(),
19
+ barMaxWidth: zBarMaxWidth.nullish(),
19
20
  theme: zTheme.nullish(),
20
21
  barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
21
22
  annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),