ggaction 0.0.5 → 0.0.6
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/CHANGELOG.md +25 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/actions/boxPlots/edit.js +455 -3
- package/src/actions/boxPlots/options.js +3 -3
- package/src/actions/composition/actions.js +13 -3
- package/src/actions/data/bin2d.js +140 -17
- package/src/actions/data/index.js +6 -1
- package/src/actions/data/intervalEdit.js +76 -0
- package/src/actions/distributions/revision.js +326 -0
- package/src/actions/encodings/appearance.js +35 -1
- package/src/actions/encodings/density.js +215 -80
- package/src/actions/encodings/index.js +2 -0
- package/src/actions/encodings/remove.js +268 -0
- package/src/actions/errorBands/edit.js +121 -13
- package/src/actions/errorBars/edit.js +45 -8
- package/src/actions/errorBars/options.js +7 -1
- package/src/actions/facets/actions.js +136 -1
- package/src/actions/gradientPlots/edit.js +352 -4
- package/src/actions/guides/axes/edit.js +129 -47
- package/src/actions/guides/legends/categorical/actions.js +19 -8
- package/src/actions/guides/legends/continuous/common.js +3 -3
- package/src/actions/guides/legends/edit.js +61 -3
- package/src/actions/guides/legends/remove.js +124 -23
- package/src/actions/guides/legends/strokeWidth.js +42 -14
- package/src/actions/marks/arc/actions.js +46 -14
- package/src/actions/marks/point/edit.js +15 -3
- package/src/actions/marks/point/materialize.js +9 -3
- package/src/actions/marks/rule/actions.js +4 -1
- package/src/actions/regression/edit.js +235 -74
- package/src/actions/selection/actions.js +122 -2
- package/src/actions/selection/index.js +6 -0
- package/src/core/vocabulary.js +7 -0
- package/types/index.d.ts +1 -0
- package/types/program.d.ts +71 -7
package/types/program.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export interface CompositionOptions {
|
|
|
96
96
|
padding?: number | CompositionPadding;
|
|
97
97
|
}
|
|
98
98
|
export interface EditCompositionLayoutOptions {
|
|
99
|
+
columns?: number;
|
|
99
100
|
gap?: number;
|
|
100
101
|
align?: CompositionAlign;
|
|
101
102
|
padding?: number | CompositionPadding;
|
|
@@ -486,6 +487,12 @@ export type SelectMarksOptions = {
|
|
|
486
487
|
id?: string;
|
|
487
488
|
target?: string;
|
|
488
489
|
} & MarkSelector;
|
|
490
|
+
export type EditMarkSelectionOptions = {
|
|
491
|
+
selection?: string;
|
|
492
|
+
} & MarkSelector;
|
|
493
|
+
export interface RemoveMarkSelectionOptions {
|
|
494
|
+
selection?: string;
|
|
495
|
+
}
|
|
489
496
|
export type FilterMarksOptions = {
|
|
490
497
|
target?: string;
|
|
491
498
|
} & MarkSelector;
|
|
@@ -1116,6 +1123,18 @@ export interface Bin2DDataOptions {
|
|
|
1116
1123
|
as?: Bin2DOutputFields;
|
|
1117
1124
|
}
|
|
1118
1125
|
|
|
1126
|
+
export interface EditBin2DDataOptions {
|
|
1127
|
+
target?: string;
|
|
1128
|
+
source?: string;
|
|
1129
|
+
x?: string;
|
|
1130
|
+
y?: string;
|
|
1131
|
+
bins?: number | Bin2DCounts;
|
|
1132
|
+
extent?: Bin2DExtent;
|
|
1133
|
+
includeEmpty?: boolean;
|
|
1134
|
+
members?: boolean;
|
|
1135
|
+
as?: DatasetBin2DOutputFields;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1119
1138
|
export interface ErrorBarPositionChannel {
|
|
1120
1139
|
field?: string;
|
|
1121
1140
|
fieldType?: "nominal" | "ordinal" | "temporal";
|
|
@@ -1165,6 +1184,11 @@ export interface EditErrorBarOptions {
|
|
|
1165
1184
|
strokeWidth?: number;
|
|
1166
1185
|
strokeDash?: DashStyle | DashPattern;
|
|
1167
1186
|
opacity?: number;
|
|
1187
|
+
statistics?: {
|
|
1188
|
+
center?: IntervalCenter;
|
|
1189
|
+
extent?: IntervalExtent;
|
|
1190
|
+
level?: number;
|
|
1191
|
+
};
|
|
1168
1192
|
}
|
|
1169
1193
|
|
|
1170
1194
|
export interface BoxPlotCategoryChannel {
|
|
@@ -1217,6 +1241,9 @@ export interface BoxPlotOptions {
|
|
|
1217
1241
|
|
|
1218
1242
|
export interface EditBoxPlotOptions {
|
|
1219
1243
|
target?: string;
|
|
1244
|
+
data?: string;
|
|
1245
|
+
x?: BoxPlotPositionChannel;
|
|
1246
|
+
y?: BoxPlotPositionChannel;
|
|
1220
1247
|
whisker?: BoxPlotWhisker;
|
|
1221
1248
|
width?: { band?: number };
|
|
1222
1249
|
outliers?: boolean;
|
|
@@ -1313,6 +1340,9 @@ export interface ViolinPlotOptions {
|
|
|
1313
1340
|
|
|
1314
1341
|
export interface EditGradientPlotOptions {
|
|
1315
1342
|
target?: string;
|
|
1343
|
+
data?: string;
|
|
1344
|
+
x?: GradientPlotPositionChannel;
|
|
1345
|
+
y?: GradientPlotPositionChannel;
|
|
1316
1346
|
density?: GradientPlotDensityOptions;
|
|
1317
1347
|
width?: { band?: number };
|
|
1318
1348
|
gradient?: GradientPlotAppearanceOptions;
|
|
@@ -1547,6 +1577,18 @@ export interface EditErrorBandOptions {
|
|
|
1547
1577
|
fill?: string;
|
|
1548
1578
|
opacity?: number;
|
|
1549
1579
|
curve?: CurveInterpolation;
|
|
1580
|
+
statistics?: {
|
|
1581
|
+
center?: IntervalCenter;
|
|
1582
|
+
extent?: IntervalExtent;
|
|
1583
|
+
level?: number;
|
|
1584
|
+
};
|
|
1585
|
+
boundaries?: false | {
|
|
1586
|
+
stroke?: string;
|
|
1587
|
+
strokeWidth?: number;
|
|
1588
|
+
strokeDash?: DashStyle | DashPattern;
|
|
1589
|
+
opacity?: number;
|
|
1590
|
+
curve?: CurveInterpolation;
|
|
1591
|
+
};
|
|
1550
1592
|
}
|
|
1551
1593
|
|
|
1552
1594
|
export interface EditErrorBandBoundaryOptions {
|
|
@@ -1561,6 +1603,9 @@ export interface EditErrorBandBoundaryOptions {
|
|
|
1561
1603
|
|
|
1562
1604
|
export interface EditDensityOptions {
|
|
1563
1605
|
target?: string;
|
|
1606
|
+
source?: string;
|
|
1607
|
+
field?: string;
|
|
1608
|
+
groupBy?: string | false;
|
|
1564
1609
|
bandwidth?: "auto" | number;
|
|
1565
1610
|
extent?: "auto" | readonly [number, number];
|
|
1566
1611
|
steps?: number;
|
|
@@ -1890,6 +1935,10 @@ export type RegressionOptions = RegressionCommonOptions & (
|
|
|
1890
1935
|
|
|
1891
1936
|
export interface EditRegressionOptions {
|
|
1892
1937
|
target?: string;
|
|
1938
|
+
data?: string;
|
|
1939
|
+
x?: string;
|
|
1940
|
+
y?: string;
|
|
1941
|
+
groupBy?: string | false;
|
|
1893
1942
|
method?: RegressionMethod;
|
|
1894
1943
|
degree?: number;
|
|
1895
1944
|
span?: number;
|
|
@@ -1913,6 +1962,7 @@ export interface RemoveGridOptions {
|
|
|
1913
1962
|
|
|
1914
1963
|
export interface RemoveLegendOptions {
|
|
1915
1964
|
target?: string;
|
|
1965
|
+
channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
|
|
1916
1966
|
}
|
|
1917
1967
|
|
|
1918
1968
|
export interface RemoveMarkOptions {
|
|
@@ -2023,11 +2073,11 @@ export interface EditLegendBorderOptions {
|
|
|
2023
2073
|
|
|
2024
2074
|
export interface EditAxisOptions<P extends string> {
|
|
2025
2075
|
position?: P;
|
|
2026
|
-
line?: AxisLineStyleOptions;
|
|
2027
|
-
ticks?: Omit<AxisTickOptions<P>, "scale" | "position">;
|
|
2028
|
-
labels?: Omit<AxisLabelOptions<P>, "scale" | "position">;
|
|
2029
|
-
ticksAndLabels?: Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
|
|
2030
|
-
title?: Omit<AxisTitleOptions<P>, "scale" | "position">;
|
|
2076
|
+
line?: false | AxisLineStyleOptions;
|
|
2077
|
+
ticks?: false | Omit<AxisTickOptions<P>, "scale" | "position">;
|
|
2078
|
+
labels?: false | Omit<AxisLabelOptions<P>, "scale" | "position">;
|
|
2079
|
+
ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
|
|
2080
|
+
title?: false | Omit<AxisTitleOptions<P>, "scale" | "position">;
|
|
2031
2081
|
}
|
|
2032
2082
|
|
|
2033
2083
|
export interface TitleTextStyleOptions {
|
|
@@ -2086,12 +2136,16 @@ export class ChartProgram {
|
|
|
2086
2136
|
filterData(options: FilterDataOptions): ChartProgram;
|
|
2087
2137
|
filterMarks(options: FilterMarksOptions): ChartProgram;
|
|
2088
2138
|
selectMarks(options: SelectMarksOptions): ChartProgram;
|
|
2139
|
+
editMarkSelection(options: EditMarkSelectionOptions): ChartProgram;
|
|
2140
|
+
removeMarkHighlight(options?: RemoveMarkSelectionOptions): ChartProgram;
|
|
2141
|
+
removeMarkSelection(options?: RemoveMarkSelectionOptions): ChartProgram;
|
|
2089
2142
|
highlightMarks(options: HighlightMarksOptions): ChartProgram;
|
|
2090
2143
|
createDensityData(options: DensityDataOptions): ChartProgram;
|
|
2091
2144
|
createRegressionData(options: RegressionDataOptions): ChartProgram;
|
|
2092
2145
|
createIntervalData(options: IntervalDataOptions): ChartProgram;
|
|
2093
2146
|
createWindowData(options: WindowDataOptions): ChartProgram;
|
|
2094
2147
|
createBin2DData(options: Bin2DDataOptions): ChartProgram;
|
|
2148
|
+
editBin2DData(options: EditBin2DDataOptions): ChartProgram;
|
|
2095
2149
|
|
|
2096
2150
|
createPointMark(options?: {
|
|
2097
2151
|
id?: string;
|
|
@@ -2107,7 +2161,7 @@ export class ChartProgram {
|
|
|
2107
2161
|
shape?: PointShape;
|
|
2108
2162
|
fill?: string;
|
|
2109
2163
|
opacity?: number;
|
|
2110
|
-
stroke?: string;
|
|
2164
|
+
stroke?: string | false;
|
|
2111
2165
|
strokeWidth?: number;
|
|
2112
2166
|
}): ChartProgram;
|
|
2113
2167
|
jitterPoints(options: JitterPointsOptions): ChartProgram;
|
|
@@ -2169,7 +2223,7 @@ export class ChartProgram {
|
|
|
2169
2223
|
padAngle?: number;
|
|
2170
2224
|
fill?: string;
|
|
2171
2225
|
opacity?: number;
|
|
2172
|
-
stroke?: string;
|
|
2226
|
+
stroke?: string | false;
|
|
2173
2227
|
strokeWidth?: number;
|
|
2174
2228
|
}): ChartProgram;
|
|
2175
2229
|
createRectMark(options?: RectMarkOptions): ChartProgram;
|
|
@@ -2200,6 +2254,7 @@ export class ChartProgram {
|
|
|
2200
2254
|
encodeOpacity(options: OpacityEncodingOptions): ChartProgram;
|
|
2201
2255
|
encodeRadius(options: { value: number; target?: string }): ChartProgram;
|
|
2202
2256
|
encodePointRadius(options: { value: number; target?: string }): ChartProgram;
|
|
2257
|
+
removePointRadius(options?: { target?: string }): ChartProgram;
|
|
2203
2258
|
encodeXOffset(options: XOffsetEncodingOptions): ChartProgram;
|
|
2204
2259
|
encodeYOffset(options: YOffsetEncodingOptions): ChartProgram;
|
|
2205
2260
|
encodeY2(options: SecondaryPositionEncodingOptions): ChartProgram;
|
|
@@ -2223,6 +2278,13 @@ export class ChartProgram {
|
|
|
2223
2278
|
encodePathOrder(options: PathOrderEncodingOptions): ChartProgram;
|
|
2224
2279
|
encodeParallelCoordinates(options: ParallelCoordinatesEncodingOptions): ChartProgram;
|
|
2225
2280
|
removePathOrder(options?: RemovePathOrderOptions): ChartProgram;
|
|
2281
|
+
removeEncoding(options: {
|
|
2282
|
+
target?: string;
|
|
2283
|
+
channel:
|
|
2284
|
+
| "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset"
|
|
2285
|
+
| "theta" | "radius" | "color" | "strokeDash" | "strokeWidth"
|
|
2286
|
+
| "size" | "shape" | "group" | "opacity" | "text";
|
|
2287
|
+
}): ChartProgram;
|
|
2226
2288
|
encodeText(options: TextEncodingOptions): ChartProgram;
|
|
2227
2289
|
encodeHistogram(options: HistogramEncodingOptions): ChartProgram;
|
|
2228
2290
|
encodeDensity(options: DensityEncodingOptions): ChartProgram;
|
|
@@ -2340,6 +2402,8 @@ export class ChartProgram {
|
|
|
2340
2402
|
editCompositionLayout(options: EditCompositionLayoutOptions): ChartProgram;
|
|
2341
2403
|
replaceCompositionChild(options: ReplaceCompositionChildOptions): ChartProgram;
|
|
2342
2404
|
facet(options: FacetOptions): ChartProgram;
|
|
2405
|
+
editFacetScales(options: FacetScaleResolutions): ChartProgram;
|
|
2406
|
+
editFacetGuides(options: FacetGuideOptions): ChartProgram;
|
|
2343
2407
|
editFacetHeaders(options: EditFacetHeadersOptions): ChartProgram;
|
|
2344
2408
|
|
|
2345
2409
|
editSemantic(options: EditSemanticOptions): ChartProgram;
|