v2 UI should adjust the number of ticks on dashboards based on screen size
[WebKit-https.git] / Websites / perf.webkit.org / public / v2 / interactive-chart.js
index 1b65626a186786881e699400f3f454863f53ba1e..68c44cd32fb1ec96fd6ef1ebb0638f0dbc6998df 100644 (file)
@@ -249,12 +249,15 @@ App.InteractiveChartComponent = Ember.Component.extend({
         this._y.range([this._contentHeight, 0]);
 
         if (this._xAxis) {
+            this._xAxis.ticks(Math.round(this._contentWidth / 4 / rem));
             this._xAxis.tickSize(-this._contentHeight);
             this._xAxisLabels.attr("transform", "translate(0," + this._contentHeight + ")");
         }
 
-        if (this._yAxis)
+        if (this._yAxis) {
+            this._yAxis.ticks(Math.round(this._contentHeight / 2 / rem));
             this._yAxis.tickSize(-this._contentWidth);
+        }
 
         if (this._currentItemLine) {
             this._currentItemLine