Skip to content

Commit

Permalink
fixed slider
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Dec 13, 2023
1 parent 6529042 commit db223bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions searchlib/components/Vis/HistogramSlider/HistogramSlider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const HistogramSlider = ({
const step = (extent[1] - extent[0]) / data.length;

// TODO: fix step, ticks count

const ticks_cnt = Math.min(data.length, 5) || 5;
return (
<div
style={{
Expand Down Expand Up @@ -117,7 +117,7 @@ const HistogramSlider = ({
</div>
)}
</Tracks>
<Ticks count={5}>
<Ticks count={ticks_cnt}>
{({ ticks }) => (
<div className="slider-ticks">
{ticks.map((tick) => (
Expand Down

0 comments on commit db223bf

Please sign in to comment.