diff --git a/packages/components/src/components/DistributionChart.tsx b/packages/components/src/components/DistributionChart.tsx index 1cedc372..1a055ea9 100644 --- a/packages/components/src/components/DistributionChart.tsx +++ b/packages/components/src/components/DistributionChart.tsx @@ -110,6 +110,8 @@ export const DistributionChart: React.FC = (props) => { }) : shapes.value; + console.log({ data }); + return (
{logX && shapes.value.some(hasMassBelowZero) ? ( diff --git a/packages/components/src/components/SquiggleChart.tsx b/packages/components/src/components/SquiggleChart.tsx index 7bc2e737..2d05c1be 100644 --- a/packages/components/src/components/SquiggleChart.tsx +++ b/packages/components/src/components/SquiggleChart.tsx @@ -51,7 +51,9 @@ export interface SquiggleChartProps { minX?: number; /** Specify the upper bound of the x scale */ maxX?: number; - // /** Whether the x-axis should be dates or numbers */ + // /** Whether to include the sample band below the chart */ + sample?: boolean; + /** Whether the x-axis should be dates or numbers */ xAxis?: "number" | "dateTime"; /** Whether to show vega actions to the user, so they can copy the chart spec */ distributionChartActions?: boolean; @@ -81,6 +83,7 @@ export const SquiggleChart: React.FC = React.memo( maxX, color, title, + sample = false, xAxis = "number", distributionChartActions, enableLocalSettings = false, @@ -93,7 +96,7 @@ export const SquiggleChart: React.FC = React.memo( onChange, executionId, }); - + console.log({ result }); const distributionPlotSettings = { showSummary, logX, @@ -104,6 +107,7 @@ export const SquiggleChart: React.FC = React.memo( color, title, xAxis, + sample, actions: distributionChartActions, }; diff --git a/packages/components/src/lib/distributionSpecBuilder.ts b/packages/components/src/lib/distributionSpecBuilder.ts index b1f49f23..07253c4c 100644 --- a/packages/components/src/lib/distributionSpecBuilder.ts +++ b/packages/components/src/lib/distributionSpecBuilder.ts @@ -218,6 +218,7 @@ export function buildVegaSpec( }, }, }, + ], }, { diff --git a/packages/components/src/stories/SquiggleChart.stories.mdx b/packages/components/src/stories/SquiggleChart.stories.mdx index 2a4aa48d..72f708d7 100644 --- a/packages/components/src/stories/SquiggleChart.stories.mdx +++ b/packages/components/src/stories/SquiggleChart.stories.mdx @@ -59,6 +59,7 @@ could be continuous, discrete or mixed. args={{ code: "SampleSet.fromDist(normal(5,2))", width, + sample: true, }} > {Template.bind({})} @@ -85,7 +86,7 @@ could be continuous, discrete or mixed.