Procházet zdrojové kódy

Add axis labels to graph

Lee Morgan před 5 roky
rodič
revize
2e6102b1a1

+ 7 - 1
views/dashboardPage/bundle.js

@@ -670,7 +670,13 @@ let analytics = {
         }
 
         const layout = {
-            title: this.ingredient.ingredient.name
+            title: this.ingredient.ingredient.name,
+            xaxis: {
+                title: "DATE"
+            },
+            yaxis: {
+                title: `QUANTITY (${this.ingredient.ingredient.unit.toUpperCase()})`,
+            }
         }
 
         Plotly.newPlot("itemUseGraph", [trace], layout);

+ 7 - 1
views/dashboardPage/js/analytics.js

@@ -101,7 +101,13 @@ let analytics = {
         }
 
         const layout = {
-            title: this.ingredient.ingredient.name
+            title: this.ingredient.ingredient.name,
+            xaxis: {
+                title: "DATE"
+            },
+            yaxis: {
+                title: `QUANTITY (${this.ingredient.ingredient.unit.toUpperCase()})`,
+            }
         }
 
         Plotly.newPlot("itemUseGraph", [trace], layout);