Added axis label

This commit is contained in:
Max Robinson
2021-02-15 13:15:11 -07:00
parent 5caa653db1
commit 04dcbdc33b
3 changed files with 5 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ const ChartController = require("./ChartController");
class CellsChart extends ChartController {
constructor() {
super("Organism Size / Composition",
"Avg. Number of Cells per Organism",
"Note: to maintain efficiency, species with very small populations are discarded when collecting cell statistics.");
}

View File

@@ -1,7 +1,7 @@
const FossilRecord = require("../FossilRecord");
class ChartController {
constructor(title, note="") {
constructor(title, y_axis="", note="") {
this.data = [];
this.chart = new CanvasJS.Chart("chartContainer", {
zoomEnabled: true,
@@ -9,9 +9,11 @@ class ChartController {
text: title
},
axisX:{
title: "Ticks",
minimum: 0,
},
axisY:{
title: y_axis,
minimum: 0,
},
data: this.data