@malloydata/render 0.0.184-dev240917174956 → 0.0.184-dev240918164740

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.
@@ -7,7 +7,7 @@ export type RendererProps = {
7
7
  tag: Tag;
8
8
  customProps?: Record<string, Record<string, unknown>>;
9
9
  };
10
- export declare function shouldRenderAs(f: Field | Explore, tagOverride?: Tag): "table" | "dashboard" | "image" | "list" | "scatter_chart" | "line_chart" | "segment_map" | "shape_map" | "cell" | "link" | "chart";
10
+ export declare function shouldRenderAs(f: Field | Explore, tagOverride?: Tag): "table" | "dashboard" | "image" | "list" | "scatter_chart" | "segment_map" | "shape_map" | "cell" | "link" | "chart";
11
11
  export declare function applyRenderer(props: RendererProps): {
12
12
  renderAs: string;
13
13
  renderValue: import("solid-js").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { Explore, ExploreField, Field, Tag } from '@malloydata/malloy';
2
2
  import { RenderResultMetadata } from './types';
3
- export type ChartSettings = {
3
+ export type ChartLayoutSettings = {
4
4
  plotWidth: number;
5
5
  plotHeight: number;
6
6
  xAxis: {
@@ -31,7 +31,10 @@ export type ChartSettings = {
31
31
  totalWidth: number;
32
32
  totalHeight: number;
33
33
  };
34
- export declare function getChartSettings(field: Explore | ExploreField, metadata: RenderResultMetadata, chartTag: Tag, options?: {
34
+ export declare function getChartLayoutSettings(field: Explore | ExploreField, metadata: RenderResultMetadata, chartTag: Tag, options: {
35
35
  xField?: Field;
36
36
  yField?: Field;
37
- }): ChartSettings;
37
+ chartType: string;
38
+ getXMinMax?: () => [number, number];
39
+ getYMinMax?: () => [number, number];
40
+ }): ChartLayoutSettings;
@@ -0,0 +1,4 @@
1
+ import { Explore, Tag } from '@malloydata/malloy';
2
+ import { LineChartSettings } from './get-line_chart-settings';
3
+ import { RenderResultMetadata, VegaChartProps } from '../types';
4
+ export declare function generateLineChartVegaLiteSpec(explore: Explore, settings: LineChartSettings, metadata: RenderResultMetadata, chartTag: Tag): VegaChartProps;
@@ -0,0 +1,10 @@
1
+ import { Explore, Tag } from '@malloydata/malloy';
2
+ import { Channel } from '../plot/plot-spec';
3
+ export type LineChartSettings = {
4
+ xChannel: Channel;
5
+ yChannel: Channel;
6
+ seriesChannel: Channel;
7
+ zeroBaseline: boolean;
8
+ interpolate?: string;
9
+ };
10
+ export declare function getLineChartSettings(explore: Explore, tagOverride?: Tag): LineChartSettings;