svelteplot 0.5.1-pr-245.3 → 0.5.1-pr-248.0

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.
@@ -5,7 +5,7 @@ export type StackOptions = {
5
5
  offset: null | StackOffset;
6
6
  order: null | StackOrder;
7
7
  reverse: boolean;
8
- };
8
+ } | false;
9
9
  export declare function stackY<T>({ data, ...channels }: TransformArg<T>, opts?: Partial<StackOptions>): TransformArg<T>;
10
10
  export declare function stackX<T>({ data, ...channels }: TransformArg<T>, opts?: Partial<StackOptions>): TransformArg<T>;
11
11
  export declare function stackMosaicX<T>(args: any, opts: any): any;
@@ -38,6 +38,10 @@ const STACK_OFFSET = {
38
38
  normalize: stackOffsetExpand
39
39
  };
40
40
  function stackXY(byDim, data, channels, options) {
41
+ if (options === false) {
42
+ // no stacking
43
+ return { data, ...channels };
44
+ }
41
45
  // we need to stack the data for each facet separately
42
46
  const groupFacetsBy = [
43
47
  channels.fx != null ? 'fx' : null,
@@ -158,6 +162,8 @@ export function stackX({ data, ...channels }, opts = {}) {
158
162
  return stackXY('x', data, channels, applyDefaults(opts));
159
163
  }
160
164
  function applyDefaults(opts) {
165
+ if (opts === false)
166
+ return false;
161
167
  if (opts.offset === 'wiggle' && opts.order === undefined) {
162
168
  return { ...DEFAULT_STACK_OPTIONS, order: 'inside-out', ...opts };
163
169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.5.1-pr-245.3",
3
+ "version": "0.5.1-pr-248.0",
4
4
  "license": "ISC",
5
5
  "author": {
6
6
  "name": "Gregor Aisch",