This commit is contained in:
2020-05-28 19:26:49 +00:00
parent 6303afcbcc
commit 261940ba5f

View File

@@ -35,6 +35,17 @@
//https://medium.com/javascript-in-plain-english/exploring-chart-js-e3ba70b07aa4
import relativeDatefilterCalculator from "../api/relative-date-filter-calculator.js";
const FORM_KEY = "ops-metrics";
//Pleasing combo of contrasting colors for lines
//from http://perceptualedge.com/articles/b-eye/choosing_colors.pdf
const CHART_LINE_COLOR = {
blue: "#1f77b4",
red: "#d62728",
orange: "#fe7f0e",
green: "#2ca02c",
purple: "#9c27b0",
yellow: "#ffeb3b"
};
export default {
created() {
let vm = this;
@@ -98,19 +109,19 @@ export default {
datasets: [
{
label: "GC Gen0",
borderColor: "red",
borderColor: "#972426",
fill: false,
data: this.obj.metricMM.gen0
},
{
label: "GC Gen1",
borderColor: "blue",
borderColor: "#2a4158",
fill: false,
data: this.obj.metricMM.gen1
},
{
label: "GC Gen2",
borderColor: "green",
borderColor: "#40817a",
fill: false,
data: this.obj.metricMM.gen2
}
@@ -122,19 +133,19 @@ export default {
datasets: [
{
label: "Allocated (MB)",
borderColor: "green",
borderColor: "#fe7f0e",
fill: false,
data: this.obj.metricMM.allocated
},
{
label: "Working set (MB)",
borderColor: "blue",
borderColor: "#2ca02c",
fill: false,
data: this.obj.metricMM.workingSet
},
{
label: "Private (MB)",
borderColor: "red",
borderColor: "#1f77b4",
fill: false,
data: this.obj.metricMM.privateBytes
}
@@ -142,6 +153,7 @@ export default {
};
}
},
methods: {
onResize() {
this.getDataFromApi();