Skip to content

Commit

Permalink
Bin size can be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
deecay committed Sep 20, 2023
1 parent 10de3e6 commit 252d9ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions viz-lib/src/visualizations/chart/Editor/XAxisSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { includes } from "lodash";
import React from "react";
import { Section, InputNumber, Switch } from "@/components/visualizations/editor";
import { Section, InputNumber, Switch, Input } from "@/components/visualizations/editor";
import { EditorPropTypes } from "@/visualizations/prop-types";
import { toNumber } from "../plotly/utils";

Expand All @@ -21,13 +21,13 @@ export default function XAxisSettings({ options, onOptionsChange }: any) {
<React.Fragment>
{/* @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message */}
<Section>
<InputNumber
<Input
label="Bin Size"
className="w-100"
placeholder="Auto"
data-test="Chart.XAxis.BinSize"
defaultValue={options.binSize}
onChange={(binSize: any) => onOptionsChange({ binSize: toNumber(binSize) })}
onChange={(e: any) => onOptionsChange({ binSize: e.target.value })}
/>
</Section>

Expand Down

0 comments on commit 252d9ba

Please sign in to comment.