@graphysdk/react-renderer 1.9.0-beta.1790263076123 → 1.9.0-beta.1790336418293

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.
@@ -1,6 +1,7 @@
1
1
  import { AxisKey } from '@graphysdk/viz-engine';
2
2
  import { Command } from '@graphysdk/viz-engine';
3
3
  import { ComponentType } from 'react';
4
+ import { CoordSystem } from '@graphysdk/viz-engine';
4
5
  import { DispatchOptions } from '@graphysdk/viz-engine';
5
6
  import { Edge } from '@graphysdk/viz-engine';
6
7
  import { EdgeSizes } from '@graphysdk/viz-engine';
@@ -22,6 +23,7 @@ import { ReactNode } from 'react';
22
23
  import { Rect } from '@graphysdk/viz-engine';
23
24
  import { ResolvedHeadlineSize } from '@graphysdk/viz-engine';
24
25
  import { Scene } from '@graphysdk/viz-engine';
26
+ import { SceneLayer } from '@graphysdk/viz-engine';
25
27
  import { SourceContent } from '@graphysdk/viz-engine';
26
28
  import { StylePointSymbol } from '@graphysdk/viz-engine';
27
29
  import { TextContent } from '@graphysdk/viz-engine';
@@ -788,6 +790,10 @@ declare interface GraphHandle {
788
790
  setSelection: (next: readonly EditTarget[]) => void;
789
791
  /** Registers a listener fired on every change to the selection; returns the unsubscribe. */
790
792
  subscribeSelection: (onSelectionChange: () => void) => () => void;
793
+ /** Whether this geom places data labels under these coords, per the plugins the graph was built with. */
794
+ canPlaceDataLabels: (geom: string, coordType: CoordSystem['type']) => boolean;
795
+ /** Whether this layer's data labels can read as percentages, per the plugins the graph was built with. */
796
+ canFormatDataLabelsAsPercentages: (layer: SceneLayer, coordType: CoordSystem['type']) => boolean;
791
797
  }
792
798
 
793
799
  /** The mode a chart runs in, which `GraphRenderer` takes as a prop and every row of `MODE_SURFACES` is keyed by. */
@@ -796,8 +802,8 @@ declare type GraphMode = (typeof GRAPH_MODES)[keyof typeof GRAPH_MODES];
796
802
  /**
797
803
  * What a chart writes on its own marks. The grid is chrome behind them, and has its own section.
798
804
  *
799
- * Each row mirrors a condition in `runtime/data-labels/strategies/*.placement.ts` and
800
- * `Geom.dataLabelCoordTypes`, so a row is only offered where the engine will draw it.
805
+ * The section and the percentage row ask the graph's placement resolver, so a plugin geom gets them. Stack
806
+ * totals and category labels only the bar draws, so those rows key on its name.
801
807
  */
802
808
  export declare const GraphOptionsSection: ({ layerId, title, layout, preview }: GraphOptionsSectionProps) => JSX.Element | null;
803
809