@visactor/vseed 0.1.13 → 0.1.14
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.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +2272 -112
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/{encodingAdapter.d.ts → adapter/encodingAdapter.d.ts} +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/{encodingAdapter.js → adapter/encodingAdapter.js} +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/adapter/encodingAdapter.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/adapter/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/adapter/index.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/bar.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/bar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/addColorToEncoding.d.ts +8 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/addColorToEncoding.js +13 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/addColorToEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/color/index.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/column.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/dualAxis.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/funnel.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/funnel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/heatmap.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/heatmap.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.d.ts +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/line.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/line.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/radar.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/radar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/rose.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/rose.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js +2 -4
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/angle.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/angle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/radius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js +26 -13
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/legend/colorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js +4 -4
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js +4 -4
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
- package/dist/esm/theme/dark.js +4 -2
- package/dist/esm/theme/dark.js.map +1 -1
- package/dist/esm/theme/light.js +4 -2
- package/dist/esm/theme/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +1404 -36
- package/dist/esm/types/chartType/area/zArea.d.ts +39 -1
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +39 -1
- package/dist/esm/types/chartType/bar/zBar.d.ts +39 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +39 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +39 -1
- package/dist/esm/types/chartType/column/zColumn.d.ts +39 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +39 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +39 -1
- package/dist/esm/types/chartType/donut/zDonut.d.ts +39 -1
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +39 -1
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +38 -0
- package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +38 -0
- package/dist/esm/types/chartType/line/zLine.d.ts +39 -1
- package/dist/esm/types/chartType/pie/zPie.d.ts +39 -1
- package/dist/esm/types/chartType/radar/zRadar.d.ts +39 -1
- package/dist/esm/types/chartType/rose/zRose.d.ts +39 -1
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +39 -1
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +39 -1
- package/dist/esm/types/properties/config/axes/axis.d.ts +0 -47
- package/dist/esm/types/properties/config/axes/axis.js +0 -54
- package/dist/esm/types/properties/config/axes/bandAxis.d.ts +0 -79
- package/dist/esm/types/properties/config/axes/bandAxis.js +0 -48
- package/dist/esm/types/properties/config/axes/index.d.ts +6 -3
- package/dist/esm/types/properties/config/axes/index.js +3 -3
- package/dist/esm/types/properties/config/axes/linearAxis.d.ts +0 -81
- package/dist/esm/types/properties/config/axes/linearAxis.js +0 -45
- package/dist/esm/types/properties/config/axes/zAxis.d.ts +47 -0
- package/dist/esm/types/properties/config/axes/zAxis.js +54 -0
- package/dist/esm/types/properties/config/axes/zAxis.js.map +1 -0
- package/dist/esm/types/properties/config/axes/zBandAxis.d.ts +79 -0
- package/dist/esm/types/properties/config/axes/zBandAxis.js +48 -0
- package/dist/esm/types/properties/config/axes/zBandAxis.js.map +1 -0
- package/dist/esm/types/properties/config/axes/zLinearAxis.d.ts +81 -0
- package/dist/esm/types/properties/config/axes/zLinearAxis.js +45 -0
- package/dist/esm/types/properties/config/axes/zLinearAxis.js.map +1 -0
- package/dist/esm/types/properties/config/config.d.ts +1404 -37
- package/dist/esm/types/properties/config/config.js +1 -2
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/config/label/label.d.ts +37 -0
- package/dist/esm/types/properties/config/label/zLabel.d.ts +38 -0
- package/dist/esm/types/properties/config/label/zLabel.js +11 -1
- package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
- package/dist/esm/types/properties/config/legend/legend.d.ts +6 -2
- package/dist/esm/types/properties/config/legend/legend.js +1 -1
- package/dist/esm/types/properties/config/legend/legend.js.map +1 -1
- package/dist/esm/types/properties/theme/customTheme.d.ts +1404 -36
- package/dist/esm/types/zVseed.d.ts +716 -32
- package/dist/umd/index.js +96 -90
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/encodingAdapter.js.map +0 -1
- package/dist/esm/types/properties/config/axes/axis.js.map +0 -1
- package/dist/esm/types/properties/config/axes/bandAxis.js.map +0 -1
- package/dist/esm/types/properties/config/axes/linearAxis.js.map +0 -1
@@ -1,6 +1,5 @@
|
|
1
1
|
import { z } from "zod";
|
2
|
-
import { zXBandAxis, zYBandAxis } from "./axes/
|
3
|
-
import { zXLinearAxis, zYLinearAxis } from "./axes/linearAxis.js";
|
2
|
+
import { zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis } from "./axes/index.js";
|
4
3
|
import { zCrosshairLine, zCrosshairRect } from "./crosshair/index.js";
|
5
4
|
import { zStackCornerRadius } from "./stackCornerRadius/stackCornerRadius.js";
|
6
5
|
import { zBackgroundColor } from "./backgroundColor/backgroundColor.js";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types/properties/config/config.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/config.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zXBandAxis, zYBandAxis } from './axes/bandAxis'\nimport { zXLinearAxis, zYLinearAxis } from './axes/linearAxis'\nimport { zCrosshairLine, zCrosshairRect } from './crosshair'\nimport { zStackCornerRadius } from './stackCornerRadius/stackCornerRadius'\nimport { zBackgroundColor } from './backgroundColor/backgroundColor'\nimport { zColor } from './color/color'\nimport { zLabel } from './label'\nimport { zLegend } from './legend/legend'\nimport { zTooltip } from './tooltip/tooltip'\nimport { zDualChartType } from '../chartType'\n\n/**\n * ---\n * zConfig by 图表类型\n */\nexport const zTableConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n\n // Border\n borderColor: z.string().nullish(),\n\n // Body\n bodyFontSize: z.number().nullish(),\n bodyFontColor: z.string().nullish(),\n bodyBackgroundColor: z.string().nullish(),\n // Body interaction\n hoverBodyBackgroundColor: z.string().nullish(),\n hoverBodyInlineBackgroundColor: z.string().nullish(),\n\n // Header\n headerFontSize: z.number().nullish(),\n headerFontColor: z.string().nullish(),\n headerBackgroundColor: z.string().nullish(),\n // Header interaction\n hoverHeaderBackgroundColor: z.string().nullish(),\n hoverHeaderInlineBackgroundColor: z.string().nullish(),\n\n // Interaction\n selectedBorderColor: z.string().nullish(),\n selectedBackgroundColor: z.string().nullish(),\n})\nexport const zPivotTableConfig = zTableConfig\n\nexport const zLineConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n})\nexport const zColumnConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n})\nexport const zColumnParallelConfig = zColumnConfig\nexport const zColumnPercentConfig = zColumnConfig\nexport const zBarConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYBandAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n})\nexport const zBarParallelConfig = zBarConfig\nexport const zBarPercentConfig = zBarConfig\nexport const zAreaConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n})\nexport const zAreaPercentConfig = zAreaConfig\n\nexport const zDualAxisConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n dualChartType: z.array(zDualChartType).or(zDualChartType).nullish(),\n alignTicks: z.array(z.boolean()).or(z.boolean()).nullish(),\n primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),\n secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),\n\n xAxis: zXBandAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n})\nexport const zScatterConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n})\n\n// polar\nexport const zRoseConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n})\nexport const zRoseParallelConfig = zRoseConfig\nexport const zPieConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n})\nexport const zDonutConfig = zPieConfig\nexport const zRadarConfig = zPieConfig\n// other\nexport const zFunnelConfig = zPieConfig\nexport const zHeatmapConfig = zPieConfig\n\n/**\n * ---\n * Type config by chart type\n */\nexport type TableConfig = z.infer<typeof zTableConfig>\nexport type PivotTableConfig = z.infer<typeof zPivotTableConfig>\n// cartesian\nexport type LineConfig = z.infer<typeof zLineConfig>\nexport type ColumnConfig = z.infer<typeof zColumnConfig>\nexport type ColumnParallelConfig = z.infer<typeof zColumnParallelConfig>\nexport type ColumnPercentConfig = z.infer<typeof zColumnPercentConfig>\nexport type BarConfig = z.infer<typeof zBarConfig>\nexport type BarParallelConfig = z.infer<typeof zBarParallelConfig>\nexport type BarPercentConfig = z.infer<typeof zBarPercentConfig>\nexport type AreaConfig = z.infer<typeof zAreaConfig>\nexport type AreaPercentConfig = z.infer<typeof zAreaPercentConfig>\n\nexport type ScatterConfig = z.infer<typeof zScatterConfig>\nexport type DualAxisConfig = z.infer<typeof zDualAxisConfig>\n// polar\nexport type RoseConfig = z.infer<typeof zRoseConfig>\nexport type RoseParallelConfig = z.infer<typeof zRoseParallelConfig>\nexport type PieConfig = z.infer<typeof zPieConfig>\nexport type DonutConfig = z.infer<typeof zDonutConfig>\nexport type RadarConfig = z.infer<typeof zRadarConfig>\n// other\nexport type FunnelConfig = z.infer<typeof zFunnelConfig>\nexport type HeatmapConfig = z.infer<typeof zHeatmapConfig>\n\n/**\n * config and type\n */\nexport type Config = z.infer<typeof zConfig>\nexport const zConfig = z.object({\n table: zTableConfig.nullish(),\n pivotTable: zPivotTableConfig.nullish(),\n\n // cartesian\n line: zLineConfig.nullish(),\n column: zColumnConfig.nullish(),\n columnParallel: zColumnParallelConfig.nullish(),\n columnPercent: zColumnPercentConfig.nullish(),\n bar: zBarConfig.nullish(),\n barParallel: zBarParallelConfig.nullish(),\n barPercent: zBarPercentConfig.nullish(),\n area: zAreaConfig.nullish(),\n areaPercent: zAreaPercentConfig.nullish(),\n\n scatter: zScatterConfig.nullish(),\n dualAxis: zDualAxisConfig.nullish(),\n\n // polar\n rose: zRoseConfig.nullish(),\n roseParallel: zRoseParallelConfig.nullish(),\n pie: zPieConfig.nullish(),\n donut: zDonutConfig.nullish(),\n radar: zRadarConfig.nullish(),\n // other\n funnel: zFunnelConfig.nullish(),\n heatmap: zHeatmapConfig.nullish(),\n})\n"],"names":["zTableConfig","z","zBackgroundColor","zPivotTableConfig","zLineConfig","zLabel","zColor","zTooltip","zLegend","zXBandAxis","zYLinearAxis","zCrosshairLine","zColumnConfig","zCrosshairRect","zStackCornerRadius","zColumnParallelConfig","zColumnPercentConfig","zBarConfig","zXLinearAxis","zYBandAxis","zBarParallelConfig","zBarPercentConfig","zAreaConfig","zAreaPercentConfig","zDualAxisConfig","zDualChartType","zScatterConfig","zRoseConfig","zRoseParallelConfig","zPieConfig","zDonutConfig","zRadarConfig","zFunnelConfig","zHeatmapConfig","zConfig"],"mappings":";;;;;;;;;;;AAgBO,MAAMA,eAAeC,EAAE,MAAM,CAAC;IACnC,iBAAiBC,iBAAiB,OAAO;IAGzC,aAAaD,EAAE,MAAM,GAAG,OAAO;IAG/B,c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ACvC;AAGO,MAAMgB,cAAc1B,EAAE,MAAM,CAAC;IAClC,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOG,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,SAASC,SAAS,OAAO;IACzB,QAAQC,QAAQ,OAAO;AACzB;AACO,MAAMoB,sBAAsBD;AAC5B,MAAME,aAAa5B,EAAE,MAAM,CAAC;IACjC,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOG,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,SAASC,SAAS,OAAO;IACzB,QAAQC,QAAQ,OAAO;AACzB;AACO,MAAMsB,eAAeD;AACrB,MAAME,eAAeF;AAErB,MAAMG,gBAAgBH;AACtB,MAAMI,iBAAiBJ;AAmCvB,MAAMK,UAAUjC,EAAE,MAAM,CAAC;IAC9B,OAAOD,aAAa,OAAO;IAC3B,YAAYG,kBAAkB,OAAO;IAGrC,MAAMC,YAAY,OAAO;IACzB,QAAQQ,cAAc,OAAO;IAC7B,gBAAgBG,sBAAsB,OAAO;IAC7C,eAAeC,qBAAqB,OAAO;IAC3C,KAAKC,WAAW,OAAO;IACvB,aAAaG,mBAAmB,OAAO;IACvC,YAAYC,kBAAkB,OAAO;IACrC,MAAMC,YAAY,OAAO;IACzB,aAAaC,mBAAmB,OAAO;IAEvC,SAASG,eAAe,OAAO;IAC/B,UAAUF,gBAAgB,OAAO;IAGjC,MAAMG,YAAY,OAAO;IACzB,cAAcC,oBAAoB,OAAO;IACzC,KAAKC,WAAW,OAAO;IACvB,OAAOC,aAAa,OAAO;IAC3B,OAAOC,aAAa,OAAO;IAE3B,QAAQC,cAAc,OAAO;IAC7B,SAASC,eAAe,OAAO;AACjC"}
|
1
|
+
{"version":3,"file":"types/properties/config/config.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/config.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zXBandAxis, zYBandAxis, zXLinearAxis, zYLinearAxis } from './axes'\nimport { zCrosshairLine, zCrosshairRect } from './crosshair'\nimport { zStackCornerRadius } from './stackCornerRadius/stackCornerRadius'\nimport { zBackgroundColor } from './backgroundColor/backgroundColor'\nimport { zColor } from './color/color'\nimport { zLabel } from './label'\nimport { zLegend } from './legend/legend'\nimport { zTooltip } from './tooltip/tooltip'\nimport { zDualChartType } from '../chartType'\n\n/**\n * zConfig by 图表类型\n */\nexport const zTableConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n\n // Border\n borderColor: z.string().nullish(),\n\n // Body\n bodyFontSize: z.number().nullish(),\n bodyFontColor: z.string().nullish(),\n bodyBackgroundColor: z.string().nullish(),\n // Body interaction\n hoverBodyBackgroundColor: z.string().nullish(),\n hoverBodyInlineBackgroundColor: z.string().nullish(),\n\n // Header\n headerFontSize: z.number().nullish(),\n headerFontColor: z.string().nullish(),\n headerBackgroundColor: z.string().nullish(),\n // Header interaction\n hoverHeaderBackgroundColor: z.string().nullish(),\n hoverHeaderInlineBackgroundColor: z.string().nullish(),\n\n // Interaction\n selectedBorderColor: z.string().nullish(),\n selectedBackgroundColor: z.string().nullish(),\n})\nexport const zPivotTableConfig = zTableConfig\n\nexport const zLineConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n})\nexport const zColumnConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n})\nexport const zColumnParallelConfig = zColumnConfig\nexport const zColumnPercentConfig = zColumnConfig\nexport const zBarConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYBandAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n})\nexport const zBarParallelConfig = zBarConfig\nexport const zBarPercentConfig = zBarConfig\nexport const zAreaConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n})\nexport const zAreaPercentConfig = zAreaConfig\n\nexport const zDualAxisConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n dualChartType: z.array(zDualChartType).or(zDualChartType).nullish(),\n alignTicks: z.array(z.boolean()).or(z.boolean()).nullish(),\n primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),\n secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),\n\n xAxis: zXBandAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n})\nexport const zScatterConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n})\n\n// polar\nexport const zRoseConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n})\nexport const zRoseParallelConfig = zRoseConfig\nexport const zPieConfig = z.object({\n backgroundColor: zBackgroundColor.nullish(),\n label: zLabel.nullish(),\n color: zColor.nullish(),\n tooltip: zTooltip.nullish(),\n legend: zLegend.nullish(),\n})\nexport const zDonutConfig = zPieConfig\nexport const zRadarConfig = zPieConfig\n// other\nexport const zFunnelConfig = zPieConfig\nexport const zHeatmapConfig = zPieConfig\n\n/**\n * ---\n * Type config by chart type\n */\nexport type TableConfig = z.infer<typeof zTableConfig>\nexport type PivotTableConfig = z.infer<typeof zPivotTableConfig>\n// cartesian\nexport type LineConfig = z.infer<typeof zLineConfig>\nexport type ColumnConfig = z.infer<typeof zColumnConfig>\nexport type ColumnParallelConfig = z.infer<typeof zColumnParallelConfig>\nexport type ColumnPercentConfig = z.infer<typeof zColumnPercentConfig>\nexport type BarConfig = z.infer<typeof zBarConfig>\nexport type BarParallelConfig = z.infer<typeof zBarParallelConfig>\nexport type BarPercentConfig = z.infer<typeof zBarPercentConfig>\nexport type AreaConfig = z.infer<typeof zAreaConfig>\nexport type AreaPercentConfig = z.infer<typeof zAreaPercentConfig>\n\nexport type ScatterConfig = z.infer<typeof zScatterConfig>\nexport type DualAxisConfig = z.infer<typeof zDualAxisConfig>\n// polar\nexport type RoseConfig = z.infer<typeof zRoseConfig>\nexport type RoseParallelConfig = z.infer<typeof zRoseParallelConfig>\nexport type PieConfig = z.infer<typeof zPieConfig>\nexport type DonutConfig = z.infer<typeof zDonutConfig>\nexport type RadarConfig = z.infer<typeof zRadarConfig>\n// other\nexport type FunnelConfig = z.infer<typeof zFunnelConfig>\nexport type HeatmapConfig = z.infer<typeof zHeatmapConfig>\n\n/**\n * config and type\n */\nexport type Config = z.infer<typeof zConfig>\nexport const zConfig = z.object({\n table: zTableConfig.nullish(),\n pivotTable: zPivotTableConfig.nullish(),\n\n // cartesian\n line: zLineConfig.nullish(),\n column: zColumnConfig.nullish(),\n columnParallel: zColumnParallelConfig.nullish(),\n columnPercent: zColumnPercentConfig.nullish(),\n bar: zBarConfig.nullish(),\n barParallel: zBarParallelConfig.nullish(),\n barPercent: zBarPercentConfig.nullish(),\n area: zAreaConfig.nullish(),\n areaPercent: zAreaPercentConfig.nullish(),\n\n scatter: zScatterConfig.nullish(),\n dualAxis: zDualAxisConfig.nullish(),\n\n // polar\n rose: zRoseConfig.nullish(),\n roseParallel: zRoseParallelConfig.nullish(),\n pie: zPieConfig.nullish(),\n donut: zDonutConfig.nullish(),\n radar: zRadarConfig.nullish(),\n // other\n funnel: zFunnelConfig.nullish(),\n heatmap: zHeatmapConfig.nullish(),\n})\n"],"names":["zTableConfig","z","zBackgroundColor","zPivotTableConfig","zLineConfig","zLabel","zColor","zTooltip","zLegend","zXBandAxis","zYLinearAxis","zCrosshairLine","zColumnConfig","zCrosshairRect","zStackCornerRadius","zColumnParallelConfig","zColumnPercentConfig","zBarConfig","zXLinearAxis","zYBandAxis","zBarParallelConfig","zBarPercentConfig","zAreaConfig","zAreaPercentConfig","zDualAxisConfig","zDualChartType","zScatterConfig","zRoseConfig","zRoseParallelConfig","zPieConfig","zDonutConfig","zRadarConfig","zFunnelConfig","zHeatmapConfig","zConfig"],"mappings":";;;;;;;;;;AAcO,MAAMA,eAAeC,EAAE,MAAM,CAAC;IACnC,iBAAiBC,iBAAiB,OAAO;IAGzC,aAAaD,EAAE,MAAM,GAAG,OAAO;IAG/B,cAAcA,EAAE,MAAM,GAAG,OAAO;IAChC,eAAeA,EAAE,MAAM,GAAG,OAAO;IACjC,qBAAqBA,EAAE,MAAM,GAAG,OAAO;IAEvC,0BAA0BA,EAAE,MAAM,GAAG,OAAO;IAC5C,gCAAgCA,EAAE,MAAM,GAAG,OAAO;IAGlD,gBAAgBA,EAAE,MAAM,GAAG,OAAO;IAClC,iBAAiBA,EAAE,MAAM,GAAG,OAAO;IACnC,uBAAuBA,EAAE,MAAM,GAAG,OAAO;IAEzC,4BAA4BA,EAAE,MAAM,GAAG,OAAO;IAC9C,kCAAkCA,EAAE,MAAM,GAAG,OAAO;IAGpD,qBAAqBA,EAAE,MAAM,GAAG,OAAO;IACvC,yB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gBH;AACtB,MAAMI,iBAAiBJ;AAmCvB,MAAMK,UAAUjC,EAAE,MAAM,CAAC;IAC9B,OAAOD,aAAa,OAAO;IAC3B,YAAYG,kBAAkB,OAAO;IAGrC,MAAMC,YAAY,OAAO;IACzB,QAAQQ,cAAc,OAAO;IAC7B,gBAAgBG,sBAAsB,OAAO;IAC7C,eAAeC,qBAAqB,OAAO;IAC3C,KAAKC,WAAW,OAAO;IACvB,aAAaG,mBAAmB,OAAO;IACvC,YAAYC,kBAAkB,OAAO;IACrC,MAAMC,YAAY,OAAO;IACzB,aAAaC,mBAAmB,OAAO;IAEvC,SAASG,eAAe,OAAO;IAC/B,UAAUF,gBAAgB,OAAO;IAGjC,MAAMG,YAAY,OAAO;IACzB,cAAcC,oBAAoB,OAAO;IACzC,KAAKC,WAAW,OAAO;IACvB,OAAOC,aAAa,OAAO;IAC3B,OAAOC,aAAa,OAAO;IAE3B,QAAQC,cAAc,OAAO;IAC7B,SAASC,eAAe,OAAO;AACjC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { NumFormat } from '../../measures';
|
1
2
|
export type Label = {
|
2
3
|
/**
|
3
4
|
* @description 标签功能是否开启
|
@@ -17,4 +18,40 @@ export type Label = {
|
|
17
18
|
* 多指标的场景, 无需担心多个指标的值会矛盾, 因为所有的绘图相关的指标, 都会经过`foldMeasures`处理, 合并为一个指标, 代表一个数据点, 所以不会矛盾
|
18
19
|
*/
|
19
20
|
showValuePercent?: boolean;
|
21
|
+
/**
|
22
|
+
* @description 标签数值是否自动格式化
|
23
|
+
*/
|
24
|
+
autoFormat?: boolean;
|
25
|
+
/**
|
26
|
+
* @description 标签数值格式化配置, 会和 `measure` 中的 `format` 进行合并, `measure` 中的 `format` 优先级更高.
|
27
|
+
*/
|
28
|
+
numFormat?: NumFormat;
|
29
|
+
/**
|
30
|
+
* @description 标签字体大小
|
31
|
+
*/
|
32
|
+
labelFontSize?: number;
|
33
|
+
/**
|
34
|
+
* @description 标签字体粗细
|
35
|
+
*/
|
36
|
+
labelFontWeight?: number | string;
|
37
|
+
/**
|
38
|
+
* @description 标签背景色
|
39
|
+
*/
|
40
|
+
labelBackgroundColor?: string;
|
41
|
+
/**
|
42
|
+
* @description 标签字体颜色
|
43
|
+
*/
|
44
|
+
labelColor?: string;
|
45
|
+
/**
|
46
|
+
* @description 标签是否自动根据图元颜色进行字体颜色的反转
|
47
|
+
*/
|
48
|
+
labelColorSmartInvert?: boolean;
|
49
|
+
/**
|
50
|
+
* @description 标签位置
|
51
|
+
*/
|
52
|
+
labelPosition?: 'inside' | 'outside';
|
53
|
+
/**
|
54
|
+
* @description 标签防重叠功能是否启用
|
55
|
+
*/
|
56
|
+
labelOverlap?: boolean;
|
20
57
|
};
|
@@ -4,4 +4,42 @@ export declare const zLabel: z.ZodObject<{
|
|
4
4
|
wrap: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
5
5
|
showValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
6
6
|
showValuePercent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
7
|
+
autoFormat: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
8
|
+
numFormat: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
9
|
+
type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
10
|
+
number: "number";
|
11
|
+
percent: "percent";
|
12
|
+
permille: "permille";
|
13
|
+
scientific: "scientific";
|
14
|
+
}>>>;
|
15
|
+
ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
16
|
+
symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
17
|
+
thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
18
|
+
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
19
|
+
suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
20
|
+
fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
21
|
+
significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
22
|
+
roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
23
|
+
morePrecision: "morePrecision";
|
24
|
+
lessPrecision: "lessPrecision";
|
25
|
+
}>>>;
|
26
|
+
roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
27
|
+
floor: "floor";
|
28
|
+
ceil: "ceil";
|
29
|
+
expand: "expand";
|
30
|
+
trunc: "trunc";
|
31
|
+
halfCeil: "halfCeil";
|
32
|
+
halfFloor: "halfFloor";
|
33
|
+
halfExpand: "halfExpand";
|
34
|
+
halfTrunc: "halfTrunc";
|
35
|
+
halfEven: "halfEven";
|
36
|
+
}>>>;
|
37
|
+
}, z.core.$strip>>>>;
|
38
|
+
labelFontSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
39
|
+
labelFontWeight: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
40
|
+
labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
41
|
+
labelColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
42
|
+
labelColorSmartInvert: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
43
|
+
labelPosition: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
44
|
+
labelOverlap: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
7
45
|
}, z.core.$strip>;
|
@@ -1,9 +1,19 @@
|
|
1
1
|
import { z } from "zod";
|
2
|
+
import { zNumFormat } from "../../measures/index.js";
|
2
3
|
const zLabel = z.object({
|
3
4
|
enable: z.boolean().nullish(),
|
4
5
|
wrap: z.boolean().nullish(),
|
5
6
|
showValue: z.boolean().nullish(),
|
6
|
-
showValuePercent: z.boolean().nullish()
|
7
|
+
showValuePercent: z.boolean().nullish(),
|
8
|
+
autoFormat: z.boolean().nullish(),
|
9
|
+
numFormat: zNumFormat.nullish(),
|
10
|
+
labelFontSize: z.number().nullish(),
|
11
|
+
labelFontWeight: z.number().or(z.string()).nullish(),
|
12
|
+
labelBackgroundColor: z.string().nullish(),
|
13
|
+
labelColor: z.string().nullish(),
|
14
|
+
labelColorSmartInvert: z.boolean().nullish(),
|
15
|
+
labelPosition: z.string().nullish(),
|
16
|
+
labelOverlap: z.boolean().nullish()
|
7
17
|
});
|
8
18
|
export { zLabel };
|
9
19
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types/properties/config/label/zLabel.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/label/zLabel.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport const zLabel = z.object({\n enable: z.boolean().nullish(),\n wrap: z.boolean().nullish(),\n showValue: z.boolean().nullish(),\n showValuePercent: z.boolean().nullish(),\n})\n"],"names":["zLabel","z"],"mappings":"
|
1
|
+
{"version":3,"file":"types/properties/config/label/zLabel.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/label/zLabel.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zNumFormat } from '../../measures'\n\nexport const zLabel = z.object({\n enable: z.boolean().nullish(),\n wrap: z.boolean().nullish(),\n showValue: z.boolean().nullish(),\n showValuePercent: z.boolean().nullish(),\n autoFormat: z.boolean().nullish(),\n numFormat: zNumFormat.nullish(),\n labelFontSize: z.number().nullish(),\n labelFontWeight: z.number().or(z.string()).nullish(),\n labelBackgroundColor: z.string().nullish(),\n labelColor: z.string().nullish(),\n labelColorSmartInvert: z.boolean().nullish(),\n labelPosition: z.string().nullish(),\n labelOverlap: z.boolean().nullish(),\n})\n"],"names":["zLabel","z","zNumFormat"],"mappings":";;AAGO,MAAMA,SAASC,EAAE,MAAM,CAAC;IAC7B,QAAQA,EAAE,OAAO,GAAG,OAAO;IAC3B,MAAMA,EAAE,OAAO,GAAG,OAAO;IACzB,WAAWA,EAAE,OAAO,GAAG,OAAO;IAC9B,kBAAkBA,EAAE,OAAO,GAAG,OAAO;IACrC,YAAYA,EAAE,OAAO,GAAG,OAAO;IAC/B,WAAWC,WAAW,OAAO;IAC7B,eAAeD,EAAE,MAAM,GAAG,OAAO;IACjC,iBAAiBA,EAAE,MAAM,GAAG,EAAE,CAACA,EAAE,MAAM,IAAI,OAAO;IAClD,sBAAsBA,EAAE,MAAM,GAAG,OAAO;IACxC,YAAYA,EAAE,MAAM,GAAG,OAAO;IAC9B,uBAAuBA,EAAE,OAAO,GAAG,OAAO;IAC1C,eAAeA,EAAE,MAAM,GAAG,OAAO;IACjC,cAAcA,EAAE,OAAO,GAAG,OAAO;AACnC"}
|
@@ -13,6 +13,10 @@ export type Legend = {
|
|
13
13
|
* @example border: true
|
14
14
|
*/
|
15
15
|
border?: boolean;
|
16
|
+
/**
|
17
|
+
* @description 图例字体颜色
|
18
|
+
*/
|
19
|
+
labelColor?: string;
|
16
20
|
/**
|
17
21
|
* @description 图例字体大小
|
18
22
|
* @example labelFontSize: 10
|
@@ -20,7 +24,7 @@ export type Legend = {
|
|
20
24
|
labelFontSize?: number;
|
21
25
|
/**
|
22
26
|
* @description 图例字体颜色
|
23
|
-
* @
|
27
|
+
* @deprecated use labelColor instead
|
24
28
|
*/
|
25
29
|
labelFontColor?: string;
|
26
30
|
/**
|
@@ -101,8 +105,8 @@ export declare const zLegend: z.ZodObject<{
|
|
101
105
|
bl: "bl";
|
102
106
|
br: "br";
|
103
107
|
}>>>>;
|
108
|
+
labelColor: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>;
|
104
109
|
labelFontSize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
105
|
-
labelFontColor: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>;
|
106
110
|
labelFontWeight: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>>;
|
107
111
|
}, z.core.$strip>;
|
108
112
|
export type ColorLegend = Pick<Legend, 'position' | 'enable'>;
|
@@ -49,8 +49,8 @@ const zLegend = z.object({
|
|
49
49
|
'bl',
|
50
50
|
'br'
|
51
51
|
]).default('bottom').nullish(),
|
52
|
+
labelColor: z.string().default('#fff').nullish(),
|
52
53
|
labelFontSize: z.number().default(12).nullish(),
|
53
|
-
labelFontColor: z.string().default('#fff').nullish(),
|
54
54
|
labelFontWeight: z.number().or(z.string()).default(400).nullish()
|
55
55
|
});
|
56
56
|
const zColorLegend = z.object({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types/properties/config/legend/legend.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/legend/legend.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport type Legend = {\n /**\n * 图例功能是否开启\n * @default true\n * @example enable: true\n */\n enable?: boolean\n /**\n * @description 图例边框是否开启\n * @warning 仅离散图例生效\n * @default true\n * @example border: true\n */\n border?: boolean\n /**\n * @description 图例字体大小\n * @example labelFontSize: 10\n */\n labelFontSize?: number\n /**\n * @description 图例字体颜色\n * @
|
1
|
+
{"version":3,"file":"types/properties/config/legend/legend.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/legend/legend.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport type Legend = {\n /**\n * 图例功能是否开启\n * @default true\n * @example enable: true\n */\n enable?: boolean\n /**\n * @description 图例边框是否开启\n * @warning 仅离散图例生效\n * @default true\n * @example border: true\n */\n border?: boolean\n\n /**\n * @description 图例字体颜色\n */\n labelColor?: string\n\n /**\n * @description 图例字体大小\n * @example labelFontSize: 10\n */\n labelFontSize?: number\n\n /**\n * @description 图例字体颜色\n * @deprecated use labelColor instead\n */\n labelFontColor?: string\n\n /**\n * @description 图例字体粗细\n * @example labelFontWeight: 400\n */\n labelFontWeight?: number | string\n /**\n * @description 图例形状\n * @warning 仅离散图例生效\n * @example shapeType: 'circle'\n */\n shapeType?:\n | 'circle'\n | 'cross'\n | 'diamond'\n | 'square'\n | 'arrow'\n | 'arrow2Left'\n | 'arrow2Right'\n | 'wedge'\n | 'thinTriangle'\n | 'triangle'\n | 'triangleUp'\n | 'triangleDown'\n | 'triangleRight'\n | 'triangleLeft'\n | 'stroke'\n | 'star'\n | 'wye'\n | 'rect'\n | 'arrowLeft'\n | 'arrowRight'\n | 'rectRound'\n | 'roundLine'\n /**\n * 图例位置\n * @default 'right'\n * @example position: 'rightTop'\n */\n position?:\n | 'left'\n | 'leftTop'\n | 'leftBottom'\n | 'lt'\n | 'lb'\n | 'top'\n | 'topLeft'\n | 'topRight'\n | 'tl'\n | 'tr'\n | 'right'\n | 'rightTop'\n | 'rightBottom'\n | 'rt'\n | 'rb'\n | 'bottom'\n | 'bottomLeft'\n | 'bottomRight'\n | 'bl'\n | 'br'\n\n /**\n * @description 存在大量图例时, 最大列数 或 图例最大行数\n * 如果position为水平方向(bottom, bottomLeft, bottomRight, bl, br, top, topLeft, topRight, tl, tr), maxSize控制显示的列数\n * 如果position为垂直方向(left, leftTop, leftBottom, lt, lb, right, rightTop, rightBottom, rt, rb), maxSize控制显示的行数\n *\n * @warning 仅离散图例生效\n * @example maxSize: 2\n * @default 1\n */\n maxSize?: number\n}\n\nexport const zLegend = z.object({\n enable: z.boolean().default(true).nullish(),\n border: z.boolean().default(true).nullish(),\n maxSize: z.number().default(1).nullish(),\n shapeType: z\n .enum([\n 'circle',\n 'cross',\n 'diamond',\n 'square',\n 'arrow',\n 'arrow2Left',\n 'arrow2Right',\n 'wedge',\n 'thinTriangle',\n 'triangle',\n 'triangleUp',\n 'triangleDown',\n 'triangleRight',\n 'triangleLeft',\n 'stroke',\n 'star',\n 'wye',\n 'rect',\n 'arrowLeft',\n 'arrowRight',\n 'rectRound',\n 'roundLine',\n ])\n .default('rectRound')\n .nullish(),\n position: z\n .enum([\n 'left',\n 'leftTop',\n 'leftBottom',\n 'lt',\n 'lb',\n 'top',\n 'topLeft',\n 'topRight',\n 'tl',\n 'tr',\n 'right',\n 'rightTop',\n 'rightBottom',\n 'rt',\n 'rb',\n 'bottom',\n 'bottomLeft',\n 'bottomRight',\n 'bl',\n 'br',\n ])\n .default('bottom')\n .nullish(),\n labelColor: z.string().default('#fff').nullish(),\n labelFontSize: z.number().default(12).nullish(),\n labelFontWeight: z.number().or(z.string()).default(400).nullish(),\n})\n\nexport type ColorLegend = Pick<Legend, 'position' | 'enable'>\nexport const zColorLegend = z.object({\n position: z\n .enum([\n 'left',\n 'leftTop',\n 'leftBottom',\n 'lt',\n 'lb',\n 'top',\n 'topLeft',\n 'topRight',\n 'tl',\n 'tr',\n 'right',\n 'rightTop',\n 'rightBottom',\n 'rt',\n 'rb',\n 'bottom',\n 'bottomLeft',\n 'bottomRight',\n 'bl',\n 'br',\n ])\n .default('bottom')\n .nullish(),\n enable: z.boolean().default(true).nullish(),\n})\n"],"names":["zLegend","z","zColorLegend"],"mappings":";AA0GO,MAAMA,UAAUC,EAAE,MAAM,CAAC;IAC9B,QAAQA,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,OAAO;IACzC,QAAQA,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,OAAO;IACzC,SAASA,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,OAAO;IACtC,WAAWA,CAAC,CAADA,OACJ,CAAC;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD,EACA,OAAO,CAAC,aACR,OAAO;IACV,UAAUA,CAAC,CAADA,OACH,CAAC;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD,EACA,OAAO,CAAC,UACR,OAAO;IACV,YAAYA,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,OAAO;IAC9C,eAAeA,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,OAAO;IAC7C,iBAAiBA,EAAE,MAAM,GAAG,EAAE,CAACA,EAAE,MAAM,IAAI,OAAO,CAAC,KAAK,OAAO;AACjE;AAGO,MAAMC,eAAeD,EAAE,MAAM,CAAC;IACnC,UAAUA,CAAC,CAADA,OACH,CAAC;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD,EACA,OAAO,CAAC,UACR,OAAO;IACV,QAAQA,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,OAAO;AAC3C"}
|