Skip to content

Commit

Permalink
fix 🐛: PR reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
squiles committed Dec 3, 2024
1 parent 535f4e6 commit 51114bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/charts/shared/chart-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export type NumericalYVariables = {

export const useNumericalYVariables = (
// Combo charts have their own logic for y scales.
chartType: "area" | "column" | "bar" | "line" | "pie" | "scatterplot",
chartType: "area" | "column" | "line" | "pie" | "scatterplot",
y: GenericField,
{ measuresById }: { measuresById: MeasuresById }
): NumericalYVariables => {
Expand All @@ -378,7 +378,6 @@ export const useNumericalYVariables = (
switch (chartType) {
case "area":
case "column":
case "bar":
case "pie":
return Math.min(0, min(data, _getY) ?? 0);
case "line":
Expand Down
6 changes: 6 additions & 0 deletions app/config-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,7 @@ type ColumnAdjusters = BaseAdjusters<ColumnConfig> & {
y: { componentId: FieldAdjuster<ColumnConfig, string> };
segment: FieldAdjuster<
ColumnConfig,
| BarSegmentField
| LineSegmentField
| AreaSegmentField
| ScatterPlotSegmentField
Expand Down Expand Up @@ -1042,6 +1043,7 @@ type LineAdjusters = BaseAdjusters<LineConfig> & {
segment: FieldAdjuster<
LineConfig,
| ColumnSegmentField
| BarSegmentField
| AreaSegmentField
| ScatterPlotSegmentField
| PieSegmentField
Expand All @@ -1057,6 +1059,7 @@ type AreaAdjusters = BaseAdjusters<AreaConfig> & {
segment: FieldAdjuster<
AreaConfig,
| ColumnSegmentField
| BarSegmentField
| LineSegmentField
| ScatterPlotSegmentField
| PieSegmentField
Expand All @@ -1071,6 +1074,7 @@ type ScatterPlotAdjusters = BaseAdjusters<ScatterPlotConfig> & {
segment: FieldAdjuster<
ScatterPlotConfig,
| ColumnSegmentField
| BarSegmentField
| LineSegmentField
| AreaSegmentField
| PieSegmentField
Expand All @@ -1086,6 +1090,7 @@ type PieAdjusters = BaseAdjusters<PieConfig> & {
segment: FieldAdjuster<
PieConfig,
| ColumnSegmentField
| BarSegmentField
| LineSegmentField
| AreaSegmentField
| ScatterPlotSegmentField
Expand All @@ -1100,6 +1105,7 @@ type TableAdjusters = {
fields: FieldAdjuster<
TableConfig,
| ColumnSegmentField
| BarSegmentField
| LineSegmentField
| AreaSegmentField
| ScatterPlotSegmentField
Expand Down

0 comments on commit 51114bd

Please sign in to comment.