@@ -77,6 +77,8 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
7777 static defaults = {
7878 pconfig : {
7979 loadFromCDN : false ,
80+ showAnnotations : true ,
81+ fixScale : '' ,
8082 traces : [ PlotlyPanelCtrl . defaultTrace ] ,
8183 settings : {
8284 type : 'scatter' ,
@@ -390,6 +392,19 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
390392 // Set the second axis
391393 layout . yaxis2 = PlotlyPanelCtrl . yaxis2 ;
392394 }
395+
396+ if ( this . cfg . fixScale ) {
397+ if ( 'x' === this . cfg . fixScale ) {
398+ layout . yaxis . scaleanchor = 'x' ;
399+ }
400+ else if ( 'y' === this . cfg . fixScale ) {
401+ layout . xaxis . scaleanchor = 'y' ;
402+ }
403+ else if ( 'z' === this . cfg . fixScale ) {
404+ layout . xaxis . scaleanchor = 'z' ;
405+ layout . yaxis . scaleanchor = 'z' ;
406+ }
407+ }
393408 return layout ;
394409 }
395410
@@ -561,7 +576,7 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
561576
562577 // Support Annotations
563578 let annotationPromise = Promise . resolve ( ) ;
564- if ( this . is3d ( ) ) {
579+ if ( ! this . cfg . showAnnotations || this . is3d ( ) ) {
565580 this . annotations . clear ( ) ;
566581 if ( this . layout ) {
567582 if ( this . layout . shapes ) {
@@ -738,6 +753,10 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
738753
739754 // Updates the layout and redraw
740755 if ( this . initialized && this . graphDiv ) {
756+ if ( ! this . cfg . showAnnotations ) {
757+ this . annotations . clear ( ) ;
758+ }
759+
741760 const s = this . cfg . settings ;
742761 const options = {
743762 showLink : false ,
0 commit comments