diff --git a/src/components/widget-plot-table.js b/src/components/widget-plot-table.js index 9c5154b..7f084c6 100644 --- a/src/components/widget-plot-table.js +++ b/src/components/widget-plot-table.js @@ -128,6 +128,9 @@ class WidgetPlotTable extends Component { }, []); } + // Make tick count proportional to the plot width using a rough scale ratio + var tickCount = Math.round(this.state.size.w / 80); + return (

{this.props.widget.name}

@@ -151,6 +154,7 @@ class WidgetPlotTable extends Component { colors={ scaleOrdinal(schemeCategory10) } gridHorizontal={true} xAccessor={(d) => { if (d != null) { return new Date(d.x); } }} + xAxisTickCount={ tickCount } hoverAnimation={false} circleRadius={0} domain={{ x: [this.state.firstTimestamp, this.state.latestTimestamp] }}