@visactor/vseed 0.0.9 → 0.0.10
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/builder/builder/builder.d.ts +222 -21
- package/dist/index.cjs +198 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +191 -50
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/pipes/annotation/annotation.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/annotation/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/annotation/annotationPoint.d.ts +2 -0
- package/dist/pipeline/spec/pipes/annotation/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/index.d.ts +1 -0
- package/dist/types/advancedVSeed.d.ts +91 -8
- package/dist/types/chartType/area/area.d.ts +6 -1
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +6 -1
- package/dist/types/chartType/bar/bar.d.ts +6 -1
- package/dist/types/chartType/barParallel/barParallel.d.ts +6 -1
- package/dist/types/chartType/barPercent/barPercent.d.ts +6 -1
- package/dist/types/chartType/column/column.d.ts +6 -1
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +6 -1
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +6 -1
- package/dist/types/chartType/line/line.d.ts +6 -1
- package/dist/types/properties/annotation/annotation.d.ts +85 -0
- package/dist/types/properties/annotation/annotationPoint.d.ts +147 -0
- package/dist/types/properties/annotation/index.d.ts +2 -0
- package/dist/types/properties/index.d.ts +1 -0
- package/dist/types/properties/markStyle/barStyle.d.ts +9 -9
- package/dist/types/properties/markStyle/markStyle.d.ts +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -639,6 +639,16 @@ const markStyle_markStyle = (advancedVSeed, context)=>{
|
|
639
639
|
markStyle
|
640
640
|
};
|
641
641
|
};
|
642
|
+
const annotation_annotation = (advancedVSeed, context)=>{
|
643
|
+
const { vseed } = context;
|
644
|
+
const annotation = external_remeda_pick(vseed, [
|
645
|
+
'annotationPoint'
|
646
|
+
]);
|
647
|
+
return {
|
648
|
+
...advancedVSeed,
|
649
|
+
annotation
|
650
|
+
};
|
651
|
+
};
|
642
652
|
const lineAdvancedPipeline = [
|
643
653
|
initAdvancedVSeed,
|
644
654
|
autoMeasures,
|
@@ -651,7 +661,8 @@ const lineAdvancedPipeline = [
|
|
651
661
|
encodingXY,
|
652
662
|
vchartBaseConfig,
|
653
663
|
lineConfig,
|
654
|
-
vchartTheme
|
664
|
+
vchartTheme,
|
665
|
+
annotation_annotation
|
655
666
|
];
|
656
667
|
const barAdvancedPipeline = [
|
657
668
|
initAdvancedVSeed,
|
@@ -666,7 +677,8 @@ const barAdvancedPipeline = [
|
|
666
677
|
barConfig,
|
667
678
|
vchartBaseConfig,
|
668
679
|
vchartTheme,
|
669
|
-
markStyle_markStyle
|
680
|
+
markStyle_markStyle,
|
681
|
+
annotation_annotation
|
670
682
|
];
|
671
683
|
const barParallelAdvancedPipeline = [
|
672
684
|
initAdvancedVSeed,
|
@@ -681,7 +693,8 @@ const barParallelAdvancedPipeline = [
|
|
681
693
|
barParallelConfig,
|
682
694
|
vchartBaseConfig,
|
683
695
|
vchartTheme,
|
684
|
-
markStyle_markStyle
|
696
|
+
markStyle_markStyle,
|
697
|
+
annotation_annotation
|
685
698
|
];
|
686
699
|
const barPercentAdvancedPipeline = [
|
687
700
|
initAdvancedVSeed,
|
@@ -696,7 +709,8 @@ const barPercentAdvancedPipeline = [
|
|
696
709
|
barPercentConfig,
|
697
710
|
vchartBaseConfig,
|
698
711
|
vchartTheme,
|
699
|
-
markStyle_markStyle
|
712
|
+
markStyle_markStyle,
|
713
|
+
annotation_annotation
|
700
714
|
];
|
701
715
|
const columnAdvancedPipeline = [
|
702
716
|
initAdvancedVSeed,
|
@@ -711,7 +725,8 @@ const columnAdvancedPipeline = [
|
|
711
725
|
columnConfig,
|
712
726
|
vchartBaseConfig,
|
713
727
|
vchartTheme,
|
714
|
-
markStyle_markStyle
|
728
|
+
markStyle_markStyle,
|
729
|
+
annotation_annotation
|
715
730
|
];
|
716
731
|
const columnParallelAdvancedPipeline = [
|
717
732
|
initAdvancedVSeed,
|
@@ -726,7 +741,8 @@ const columnParallelAdvancedPipeline = [
|
|
726
741
|
columnParallelConfig,
|
727
742
|
vchartBaseConfig,
|
728
743
|
vchartTheme,
|
729
|
-
markStyle_markStyle
|
744
|
+
markStyle_markStyle,
|
745
|
+
annotation_annotation
|
730
746
|
];
|
731
747
|
const columnPercentAdvancedPipeline = [
|
732
748
|
initAdvancedVSeed,
|
@@ -741,7 +757,8 @@ const columnPercentAdvancedPipeline = [
|
|
741
757
|
columnPercentConfig,
|
742
758
|
vchartBaseConfig,
|
743
759
|
vchartTheme,
|
744
|
-
markStyle_markStyle
|
760
|
+
markStyle_markStyle,
|
761
|
+
annotation_annotation
|
745
762
|
];
|
746
763
|
const areaAdvancedPipeline = [
|
747
764
|
initAdvancedVSeed,
|
@@ -755,7 +772,8 @@ const areaAdvancedPipeline = [
|
|
755
772
|
encodingXY,
|
756
773
|
areaConfig,
|
757
774
|
vchartBaseConfig,
|
758
|
-
vchartTheme
|
775
|
+
vchartTheme,
|
776
|
+
annotation_annotation
|
759
777
|
];
|
760
778
|
const areaPercentAdvancedPipeline = [
|
761
779
|
initAdvancedVSeed,
|
@@ -769,7 +787,8 @@ const areaPercentAdvancedPipeline = [
|
|
769
787
|
encodingXY,
|
770
788
|
areaPercentConfig,
|
771
789
|
vchartBaseConfig,
|
772
|
-
vchartTheme
|
790
|
+
vchartTheme,
|
791
|
+
annotation_annotation
|
773
792
|
];
|
774
793
|
const pieAdvancedPipeline = [
|
775
794
|
initAdvancedVSeed,
|
@@ -783,7 +802,8 @@ const pieAdvancedPipeline = [
|
|
783
802
|
encodingPolar,
|
784
803
|
pieConfig,
|
785
804
|
vchartBaseConfig,
|
786
|
-
vchartTheme
|
805
|
+
vchartTheme,
|
806
|
+
annotation_annotation
|
787
807
|
];
|
788
808
|
const dataset_dataset = (spec, context)=>{
|
789
809
|
const { advancedVSeed } = context;
|
@@ -1879,23 +1899,23 @@ const barStyle_barStyle = (spec, context)=>{
|
|
1879
1899
|
...result,
|
1880
1900
|
bar: {
|
1881
1901
|
style: {
|
1882
|
-
fill: (datum, context)=>{
|
1902
|
+
fill: barColor ? (datum, context)=>{
|
1883
1903
|
if (selector_selector(datum, barSelector)) return barColor;
|
1884
1904
|
return context.seriesColor(datum[encoding[0]?.group?.[0]]);
|
1885
|
-
},
|
1886
|
-
fillOpacity: (datum)=>{
|
1905
|
+
} : void 0,
|
1906
|
+
fillOpacity: barColorOpacity ? (datum)=>{
|
1887
1907
|
if (selector_selector(datum, barSelector)) return barColorOpacity;
|
1888
1908
|
return 1;
|
1889
|
-
},
|
1890
|
-
stroke: (datum, context)=>{
|
1909
|
+
} : void 0,
|
1910
|
+
stroke: barBorderColor ? (datum, context)=>{
|
1891
1911
|
if (selector_selector(datum, barSelector)) return barBorderColor;
|
1892
1912
|
return context.seriesColor(datum[encoding[0]?.group?.[0]]);
|
1893
|
-
},
|
1894
|
-
lineWidth: (datum)=>{
|
1913
|
+
} : void 0,
|
1914
|
+
lineWidth: barBorderWidth ? (datum)=>{
|
1895
1915
|
if (selector_selector(datum, barSelector)) return barBorderWidth;
|
1896
1916
|
return 0;
|
1897
|
-
},
|
1898
|
-
lineDash: (datum)=>{
|
1917
|
+
} : void 0,
|
1918
|
+
lineDash: barBorderStyle ? (datum)=>{
|
1899
1919
|
if (selector_selector(datum, barSelector)) {
|
1900
1920
|
if ('solid' === barBorderStyle) ;
|
1901
1921
|
else if ('dashed' === barBorderStyle) return [
|
@@ -1911,15 +1931,85 @@ const barStyle_barStyle = (spec, context)=>{
|
|
1911
1931
|
0,
|
1912
1932
|
0
|
1913
1933
|
];
|
1914
|
-
},
|
1915
|
-
cornerRadius: (datum)=>{
|
1934
|
+
} : void 0,
|
1935
|
+
cornerRadius: barRadius ? (datum)=>{
|
1916
1936
|
if (selector_selector(datum, barSelector)) return barRadius;
|
1917
1937
|
return 0;
|
1918
|
-
}
|
1938
|
+
} : void 0
|
1919
1939
|
}
|
1920
1940
|
}
|
1921
1941
|
};
|
1922
1942
|
};
|
1943
|
+
const annotationPoint_annotationPoint = (spec, context)=>{
|
1944
|
+
const { advancedVSeed } = context;
|
1945
|
+
const { annotation } = advancedVSeed;
|
1946
|
+
if (!annotation || !annotation.annotationPoint) return spec;
|
1947
|
+
const { annotationPoint } = annotation;
|
1948
|
+
const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
|
1949
|
+
annotationPoint
|
1950
|
+
];
|
1951
|
+
const markPoint = annotationPointList.flatMap((annotationPoint)=>{
|
1952
|
+
const { selector: selectorPoint, text = '', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'middle', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 4, backgroundVisible = true, offsetX = 0, offsetY = 0 } = annotationPoint;
|
1953
|
+
const dataset = advancedVSeed.dataset.flat();
|
1954
|
+
const selectedData = dataset.filter((datum)=>selector_selector(datum, selectorPoint));
|
1955
|
+
return selectedData.map((datum)=>({
|
1956
|
+
regionRelative: true,
|
1957
|
+
position: (data, context)=>{
|
1958
|
+
const targetDatum = data.find((item)=>isSubset(datum, item));
|
1959
|
+
if (targetDatum) {
|
1960
|
+
const { x, y } = context.dataToPosition(targetDatum);
|
1961
|
+
const xBandWidth = context.scaleX?.bandwidth?.();
|
1962
|
+
const yBandWidth = context.scaleY?.bandwidth?.();
|
1963
|
+
if (xBandWidth) return {
|
1964
|
+
x: x,
|
1965
|
+
y: y
|
1966
|
+
};
|
1967
|
+
if (yBandWidth) return {
|
1968
|
+
x,
|
1969
|
+
y: y
|
1970
|
+
};
|
1971
|
+
}
|
1972
|
+
},
|
1973
|
+
itemLine: {
|
1974
|
+
visible: false
|
1975
|
+
},
|
1976
|
+
itemContent: {
|
1977
|
+
offsetY,
|
1978
|
+
offsetX,
|
1979
|
+
text: {
|
1980
|
+
visible: true,
|
1981
|
+
text: text,
|
1982
|
+
style: {
|
1983
|
+
textAlign: textAlign,
|
1984
|
+
textBaseline: textBaseline,
|
1985
|
+
fill: textColor,
|
1986
|
+
fontSize: textFontSize,
|
1987
|
+
fontWeight: textFontWeight
|
1988
|
+
},
|
1989
|
+
labelBackground: {
|
1990
|
+
visible: backgroundVisible,
|
1991
|
+
padding: backgroundPadding,
|
1992
|
+
style: {
|
1993
|
+
cornerRadius: backgroundBorderRadius ?? 4,
|
1994
|
+
fill: backgroundColor,
|
1995
|
+
stroke: backgroundBorderColor,
|
1996
|
+
strokeWidth: backgroundBorderWidth
|
1997
|
+
}
|
1998
|
+
}
|
1999
|
+
}
|
2000
|
+
}
|
2001
|
+
}));
|
2002
|
+
});
|
2003
|
+
return {
|
2004
|
+
...spec,
|
2005
|
+
markPoint
|
2006
|
+
};
|
2007
|
+
};
|
2008
|
+
const isSubset = (sub, obj)=>Object.entries(sub).every(([key, value])=>{
|
2009
|
+
if ('string' == typeof value) return obj[key] === value;
|
2010
|
+
if ('number' == typeof value) return obj[key] === value;
|
2011
|
+
return true;
|
2012
|
+
});
|
1923
2013
|
const line_line = [
|
1924
2014
|
initLine,
|
1925
2015
|
color_color,
|
@@ -1929,7 +2019,8 @@ const line_line = [
|
|
1929
2019
|
yLinear,
|
1930
2020
|
label_label,
|
1931
2021
|
tooltip_tooltip,
|
1932
|
-
discreteLegend
|
2022
|
+
discreteLegend,
|
2023
|
+
annotationPoint_annotationPoint
|
1933
2024
|
];
|
1934
2025
|
const pivotLine = [
|
1935
2026
|
initPivot,
|
@@ -1944,7 +2035,8 @@ const pivotLine = [
|
|
1944
2035
|
xBand,
|
1945
2036
|
yLinear,
|
1946
2037
|
label_label,
|
1947
|
-
tooltip_tooltip
|
2038
|
+
tooltip_tooltip,
|
2039
|
+
annotationPoint_annotationPoint
|
1948
2040
|
]),
|
1949
2041
|
pivotRowDimensions,
|
1950
2042
|
pivotColumnDimensions,
|
@@ -1964,7 +2056,8 @@ const column = [
|
|
1964
2056
|
label_label,
|
1965
2057
|
tooltip_tooltip,
|
1966
2058
|
discreteLegend,
|
1967
|
-
barStyle_barStyle
|
2059
|
+
barStyle_barStyle,
|
2060
|
+
annotationPoint_annotationPoint
|
1968
2061
|
];
|
1969
2062
|
const pivotColumn = [
|
1970
2063
|
initPivot,
|
@@ -1981,7 +2074,8 @@ const pivotColumn = [
|
|
1981
2074
|
yLinear,
|
1982
2075
|
label_label,
|
1983
2076
|
tooltip_tooltip,
|
1984
|
-
barStyle_barStyle
|
2077
|
+
barStyle_barStyle,
|
2078
|
+
annotationPoint_annotationPoint
|
1985
2079
|
]),
|
1986
2080
|
pivotRowDimensions,
|
1987
2081
|
pivotColumnDimensions,
|
@@ -2000,7 +2094,8 @@ const columnParallel = [
|
|
2000
2094
|
label_label,
|
2001
2095
|
tooltip_tooltip,
|
2002
2096
|
discreteLegend,
|
2003
|
-
barStyle_barStyle
|
2097
|
+
barStyle_barStyle,
|
2098
|
+
annotationPoint_annotationPoint
|
2004
2099
|
];
|
2005
2100
|
const pivotColumnParallel = [
|
2006
2101
|
initPivot,
|
@@ -2016,7 +2111,8 @@ const pivotColumnParallel = [
|
|
2016
2111
|
yLinear,
|
2017
2112
|
label_label,
|
2018
2113
|
tooltip_tooltip,
|
2019
|
-
barStyle_barStyle
|
2114
|
+
barStyle_barStyle,
|
2115
|
+
annotationPoint_annotationPoint
|
2020
2116
|
]),
|
2021
2117
|
pivotRowDimensions,
|
2022
2118
|
pivotColumnDimensions,
|
@@ -2037,7 +2133,8 @@ const columnPercent = [
|
|
2037
2133
|
label_label,
|
2038
2134
|
tooltip_tooltip,
|
2039
2135
|
discreteLegend,
|
2040
|
-
barStyle_barStyle
|
2136
|
+
barStyle_barStyle,
|
2137
|
+
annotationPoint_annotationPoint
|
2041
2138
|
];
|
2042
2139
|
const pivotColumnPercent = [
|
2043
2140
|
initPivot,
|
@@ -2055,7 +2152,8 @@ const pivotColumnPercent = [
|
|
2055
2152
|
yLinear,
|
2056
2153
|
label_label,
|
2057
2154
|
tooltip_tooltip,
|
2058
|
-
barStyle_barStyle
|
2155
|
+
barStyle_barStyle,
|
2156
|
+
annotationPoint_annotationPoint
|
2059
2157
|
]),
|
2060
2158
|
pivotRowDimensions,
|
2061
2159
|
pivotColumnDimensions,
|
@@ -2074,7 +2172,8 @@ const bar = [
|
|
2074
2172
|
label_label,
|
2075
2173
|
tooltip_tooltip,
|
2076
2174
|
discreteLegend,
|
2077
|
-
barStyle_barStyle
|
2175
|
+
barStyle_barStyle,
|
2176
|
+
annotationPoint_annotationPoint
|
2078
2177
|
];
|
2079
2178
|
const pivotBar = [
|
2080
2179
|
initPivot,
|
@@ -2090,7 +2189,8 @@ const pivotBar = [
|
|
2090
2189
|
label_label,
|
2091
2190
|
label_label,
|
2092
2191
|
tooltip_tooltip,
|
2093
|
-
barStyle_barStyle
|
2192
|
+
barStyle_barStyle,
|
2193
|
+
annotationPoint_annotationPoint
|
2094
2194
|
]),
|
2095
2195
|
pivotRowDimensions,
|
2096
2196
|
pivotColumnDimensions,
|
@@ -2109,7 +2209,8 @@ const barParallel = [
|
|
2109
2209
|
label_label,
|
2110
2210
|
tooltip_tooltip,
|
2111
2211
|
discreteLegend,
|
2112
|
-
barStyle_barStyle
|
2212
|
+
barStyle_barStyle,
|
2213
|
+
annotationPoint_annotationPoint
|
2113
2214
|
];
|
2114
2215
|
const pivotBarParallel = [
|
2115
2216
|
initPivot,
|
@@ -2125,7 +2226,8 @@ const pivotBarParallel = [
|
|
2125
2226
|
xLinear,
|
2126
2227
|
label_label,
|
2127
2228
|
tooltip_tooltip,
|
2128
|
-
barStyle_barStyle
|
2229
|
+
barStyle_barStyle,
|
2230
|
+
annotationPoint_annotationPoint
|
2129
2231
|
]),
|
2130
2232
|
pivotRowDimensions,
|
2131
2233
|
pivotColumnDimensions,
|
@@ -2145,7 +2247,8 @@ const barPercent = [
|
|
2145
2247
|
label_label,
|
2146
2248
|
tooltip_tooltip,
|
2147
2249
|
discreteLegend,
|
2148
|
-
barStyle_barStyle
|
2250
|
+
barStyle_barStyle,
|
2251
|
+
annotationPoint_annotationPoint
|
2149
2252
|
];
|
2150
2253
|
const pivotBarPercent = [
|
2151
2254
|
initPivot,
|
@@ -2162,7 +2265,8 @@ const pivotBarPercent = [
|
|
2162
2265
|
xLinear,
|
2163
2266
|
label_label,
|
2164
2267
|
tooltip_tooltip,
|
2165
|
-
barStyle_barStyle
|
2268
|
+
barStyle_barStyle,
|
2269
|
+
annotationPoint_annotationPoint
|
2166
2270
|
]),
|
2167
2271
|
pivotRowDimensions,
|
2168
2272
|
pivotColumnDimensions,
|
@@ -2181,7 +2285,8 @@ const area_area = [
|
|
2181
2285
|
yLinear,
|
2182
2286
|
label_label,
|
2183
2287
|
tooltip_tooltip,
|
2184
|
-
discreteLegend
|
2288
|
+
discreteLegend,
|
2289
|
+
annotationPoint_annotationPoint
|
2185
2290
|
];
|
2186
2291
|
const pivotArea = [
|
2187
2292
|
initPivot,
|
@@ -2197,7 +2302,8 @@ const pivotArea = [
|
|
2197
2302
|
xBand,
|
2198
2303
|
yLinear,
|
2199
2304
|
label_label,
|
2200
|
-
tooltip_tooltip
|
2305
|
+
tooltip_tooltip,
|
2306
|
+
annotationPoint_annotationPoint
|
2201
2307
|
]),
|
2202
2308
|
pivotRowDimensions,
|
2203
2309
|
pivotColumnDimensions,
|
@@ -2217,7 +2323,8 @@ const areaPercent = [
|
|
2217
2323
|
yLinear,
|
2218
2324
|
label_label,
|
2219
2325
|
tooltip_tooltip,
|
2220
|
-
discreteLegend
|
2326
|
+
discreteLegend,
|
2327
|
+
annotationPoint_annotationPoint
|
2221
2328
|
];
|
2222
2329
|
const pivotAreaPercent = [
|
2223
2330
|
initPivot,
|
@@ -2234,7 +2341,8 @@ const pivotAreaPercent = [
|
|
2234
2341
|
xBand,
|
2235
2342
|
yLinear,
|
2236
2343
|
label_label,
|
2237
|
-
tooltip_tooltip
|
2344
|
+
tooltip_tooltip,
|
2345
|
+
annotationPoint_annotationPoint
|
2238
2346
|
]),
|
2239
2347
|
pivotRowDimensions,
|
2240
2348
|
pivotColumnDimensions,
|
@@ -2250,7 +2358,8 @@ const pie = [
|
|
2250
2358
|
dataset_dataset,
|
2251
2359
|
label_label,
|
2252
2360
|
tooltip_tooltip,
|
2253
|
-
discreteLegend
|
2361
|
+
discreteLegend,
|
2362
|
+
annotationPoint_annotationPoint
|
2254
2363
|
];
|
2255
2364
|
const pivotPie = [
|
2256
2365
|
initPivot,
|
@@ -2263,7 +2372,8 @@ const pivotPie = [
|
|
2263
2372
|
background_backgroundColor,
|
2264
2373
|
datasetPivotPlaceholder,
|
2265
2374
|
label_label,
|
2266
|
-
tooltip_tooltip
|
2375
|
+
tooltip_tooltip,
|
2376
|
+
annotationPoint_annotationPoint
|
2267
2377
|
]),
|
2268
2378
|
pivotRowDimensions,
|
2269
2379
|
pivotColumnDimensions,
|
@@ -3112,24 +3222,55 @@ const zBarStyle = z.object({
|
|
3112
3222
|
selector: z.union([
|
3113
3223
|
zSelector,
|
3114
3224
|
zSelectors
|
3115
|
-
]),
|
3116
|
-
barColor: z.string(),
|
3117
|
-
barColorOpacity: z.number(),
|
3118
|
-
barBorderColor: z.string(),
|
3119
|
-
barBorderWidth: z.number(),
|
3225
|
+
]).optional(),
|
3226
|
+
barColor: z.string().optional(),
|
3227
|
+
barColorOpacity: z.number().optional(),
|
3228
|
+
barBorderColor: z.string().optional(),
|
3229
|
+
barBorderWidth: z.number().optional(),
|
3120
3230
|
barBorderStyle: z.union([
|
3121
3231
|
z.literal('solid'),
|
3122
3232
|
z.literal('dashed'),
|
3123
3233
|
z.literal('dotted')
|
3124
|
-
]),
|
3234
|
+
]).optional(),
|
3125
3235
|
barRadius: z.union([
|
3126
3236
|
z.number(),
|
3127
3237
|
z.array(z.number())
|
3128
|
-
])
|
3238
|
+
]).optional()
|
3129
3239
|
});
|
3130
3240
|
const zMarkStyle = z.object({
|
3131
3241
|
barStyle: zBarStyle.optional()
|
3132
3242
|
});
|
3133
|
-
|
3243
|
+
const zAnnotationPoint = z.object({
|
3244
|
+
selector: z.union([
|
3245
|
+
zSelector,
|
3246
|
+
zSelectors
|
3247
|
+
]),
|
3248
|
+
text: z.string().or(z.array(z.string())).optional(),
|
3249
|
+
textColor: z.string().default('#ffffff').optional(),
|
3250
|
+
textFontSize: z.number().default(12).optional(),
|
3251
|
+
textFontWeight: z.number().default(400).optional(),
|
3252
|
+
textAlign: z["enum"]([
|
3253
|
+
'left',
|
3254
|
+
'right',
|
3255
|
+
'center'
|
3256
|
+
]).default('center').optional(),
|
3257
|
+
textBaseline: z["enum"]([
|
3258
|
+
'top',
|
3259
|
+
'middle',
|
3260
|
+
'bottom'
|
3261
|
+
]).default('middle').optional(),
|
3262
|
+
backgroundVisible: z.boolean().default(true).optional(),
|
3263
|
+
backgroundColor: z.string().default('#212121').optional(),
|
3264
|
+
backgroundBorderColor: z.string().optional(),
|
3265
|
+
backgroundBorderWidth: z.number().default(1).optional(),
|
3266
|
+
backgroundBorderRadius: z.number().default(4).optional(),
|
3267
|
+
backgroundPadding: z.number().optional(),
|
3268
|
+
offsetY: z.number().default(0).optional(),
|
3269
|
+
offsetX: z.number().default(0).optional()
|
3270
|
+
});
|
3271
|
+
const zAnnotation = z.object({
|
3272
|
+
annotationPoint: zAnnotationPoint.or(z.array(zAnnotationPoint)).optional()
|
3273
|
+
});
|
3274
|
+
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, darkTheme, dataReshapeFor1D1M, dataReshapeFor2D1M, execPipeline, foldMeasures, isPivotChart, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, all_registerAll as registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerLightTheme, registerLine, unfoldDimensions, zAnnotation, zAnnotationPoint, zAxis, zBackgroundColor, zBarStyle, zBaseConfig, zChartType, zColor, zConfig, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensions, zEncoding, zFoldInfo, zLabel, zLegend, zMarkStyle, zMeasure, zMeasureGroup, zMeasures, zTheme, zTooltip, zUnfoldInfo, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
3134
3275
|
|
3135
3276
|
//# sourceMappingURL=index.js.map
|