Commit 1750ad5f94024e22c9c6f2bab40196b74a053819

Authored by hitier
1 parent 7b3d3593
Exists in rhitier-dev

Fix date axis number

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
web/static/js/main.js
... ... @@ -850,7 +850,7 @@
850 850 // return formatYear(date);
851 851 };
852 852  
853   - this.xAxis = d3.axisBottom().tickFormat(multiFormat).ticks(7);
  853 + this.xAxis = d3.axisBottom().tickFormat(multiFormat);//.ticks(7);
854 854 this.yAxis = d3.axisLeft().ticks(10);
855 855 this.svg = d3.select(this.container).append('svg');
856 856 this.svg.attr("class", `${this.parameter} ${this.target.slug}`);
... ... @@ -935,7 +935,8 @@
935 935 }
936 936 this.xAxis.scale(this.xScale);
937 937 this.yAxis.scale(this.yScale);
938   - this.xAxis.ticks(Math.floor(width / 80.0));
  938 +// this.xAxis.ticks(Math.floor(width / 80.0));
  939 + this.xAxis.ticks(10)
939 940 this.yAxis.ticks(Math.floor(height / 18.0));
940 941 this.svg.select('.x.axis').attr('transform', `translate(0,${height})`).call(this.xAxis);
941 942 this.svg.select('.y.axis').call(this.yAxis);
... ...