Merge branch '19744-acr-crunchstat' refs #19744
[arvados.git] / tools / crunchstat-summary / crunchstat_summary / dygraphs.js
index 0f28bc59322f70fe72fb612b2dd4264434be3f88..76c92107042bf9663324489c6e5ed9a0d4576981 100644 (file)
@@ -40,9 +40,6 @@ window.onload = function() {
         },
     }
     chartdata.forEach(function(section, section_idx) {
-        //var h1 = document.createElement('h1');
-        //h1.appendChild(document.createTextNode(section.label));
-        //document.body.appendChild(h1);
         var chartDiv = document.getElementById("chart");
         section.charts.forEach(function(chart, chart_idx) {
             // Skip chart if every series has zero data points
@@ -69,6 +66,17 @@ window.onload = function() {
                     valueFormatter: fmt.iso,
                 },
             }
+            var div2 = document.createElement('div');
+            div2.setAttribute('style', 'width: 150px; height: 150px');
+            chart.options.labelsDiv = div2;
+            chart.options.labelsSeparateLines = true;
+
+            var div3 = document.createElement('div');
+            div3.setAttribute('style', 'display: flex; padding-bottom: 16px');
+            div3.appendChild(div);
+            div3.appendChild(div2);
+            chartDiv.appendChild(div3);
+
             charts[id] = new Dygraph(div, chart.data, chart.options);
         });
     });