Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ ComposedChart.LabelList: (props: Props)
ComposedChart.ErrorBar: (outsideProps: Props)
ComposedChartLegendProps (type, @altertable/data-app-react/ui)
ComposedChartLegendProps.maxVisibleItems?: number
ComposedChartLegendProps.interactive?: boolean — Enable hover emphasis and click to focus one or more series.
ComposedChartLegendProps.…: plus props inherited from React, recharts
ComposedChartProps (type, @altertable/data-app-react/ui): <Row> = props listed as ComposedChart.*
connectionCheck (function, @altertable/data-app/contract): <const Queries extends QueryDefinitions & { connection: QueryDefinitions[string]; }>(queries: CheckedQueries<Queries>): ConnectionOperation — A connectivity probe uses the app's registered connection query.
Expand Down Expand Up @@ -918,6 +919,7 @@ FunnelChart.className?: string
FunnelChart.horizontalGrid?: boolean — Draw horizontal grid lines behind the plotted values.
FunnelChart.steps: readonly FunnelChartStep[]
FunnelChart.series: readonly FunnelChartSeries[]
FunnelChart.interactiveLegend?: boolean — Disable legend hover and focus controls.
FunnelChartProps (type, @altertable/data-app-react/ui): = props listed as FunnelChart.*
FunnelChartSeries (type, @altertable/data-app-react/ui)
FunnelChartSeries.id: string — Unique, nonblank population ID.
Expand Down Expand Up @@ -1393,6 +1395,7 @@ RetentionChart.formatValue?: ((value: number) => string) — Formats counts; rat
RetentionChart.className?: string
RetentionChart.horizontalGrid?: boolean — Draw horizontal grid lines behind the plotted values.
RetentionChart.series: readonly RetentionChartSeries[]
RetentionChart.interactiveLegend?: boolean — Disable legend hover and focus controls.
RetentionChartPoint (type, @altertable/data-app-react/ui)
RetentionChartPoint.offset: number — Nonnegative integer, unique per series; uneven offsets retain their distance.
RetentionChartPoint.label: string — Must agree across series for the same offset.
Expand Down
4 changes: 4 additions & 0 deletions packages/data-app-react/src/ui/AnalyticsCharts.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
display: grid;
gap: var(--atbl-space-xs);
}
.altertable-funnel-legend-button {
display: grid;
gap: var(--atbl-space-xs);
}
.altertable-funnel-series-label {
display: flex;
align-items: center;
Expand Down
7 changes: 7 additions & 0 deletions packages/data-app-react/src/ui/ChartLegend.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
.altertable-chart-legend-item[data-inactive] {
opacity: var(--atbl-control-disabled-opacity);
}
.altertable-chart-legend-item[data-legend-muted],
.altertable-chart-legend-item[data-legend-excluded] {
opacity: 0.4;
}
.altertable-chart-legend-marker {
display: inline-block;
width: 8px;
Expand Down Expand Up @@ -68,6 +72,9 @@
font: inherit;
text-align: left;
}
.altertable-chart-legend-action:where(button) {
cursor: pointer;
}
.altertable-chart-legend[data-layout='vertical'][data-align='center'] {
justify-items: center;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/data-app-react/src/ui/ChartLegend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ function ChartLegendRoot({
const container = containerRef.current;
if (!container) return;
function measure() {
const list = containerRef.current?.firstElementChild;
const list = containerRef.current?.querySelector(
'.altertable-chart-legend'
);
if (list) {
setColumns(
getComputedStyle(list).gridTemplateColumns.split(' ').length
Expand Down
4 changes: 4 additions & 0 deletions packages/data-app-react/src/ui/ComposedChart.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
.altertable-composed-chart-legend-below {
padding-top: var(--atbl-space-md);
}
.altertable-chart-legend-container[data-has-heading]
.altertable-composed-chart-legend-below {
padding-top: 0;
}
.altertable-composed-chart-legend-above {
padding-bottom: var(--atbl-space-md);
}
Expand Down
Loading