Skip to content

Commit

Permalink
custom chart yaxis visibility fix (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Mar 11, 2022
1 parent fc6df76 commit 637af2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/graphs/item-detail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,23 @@ export const customChartSettings = () => {
crosshair: true,
},
yAxis: [{
visible: false,
gridLineColor: "#f2f2f2",
lineWidth: 0,
title: {
text: "hits/s"
},
},
{
visible: false,
gridLineColor: "#f2f2f2",
lineWidth: 0,
title: {
text: "ms"
},
},
{
visible: false,
gridLineColor: "#f2f2f2",
lineWidth: 0,
opposite: true,
Expand All @@ -173,6 +176,7 @@ export const customChartSettings = () => {
},
},
{
visible: false,
gridLineColor: "#f2f2f2",
lineWidth: 0,
opposite: true,
Expand All @@ -181,6 +185,7 @@ export const customChartSettings = () => {
},
},
{
visible: false,
gridLineColor: "#f2f2f2",
lineWidth: 0,
opposite: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ export class AnalyzeChartsComponent implements OnInit {
chartSeries.push(line);
}
});
// hide all axis
this.customChartsOptions.yAxis.forEach(axis => axis.visible = false)
// display only actual axis
chartSeries.forEach(serie => {
this.customChartsOptions.yAxis[serie.yAxis].visible = true
})
this.customChartsOptions.series = JSON.parse(JSON.stringify(chartSeries));
this.updateLabelChartFlag = true;
}
Expand Down

0 comments on commit 637af2c

Please sign in to comment.